コード例 #1
0
        public async Task AddLoot(string url, params string[] tags)
        {
            if (!await RequireUser(Roles.Memer))
            {
                return;
            }
            if (Looter.Contains(url) && !Config.Current.AllowDuplicates)
            {
                await ReplyAsync("Url is schon drin ma boi");

                return;
            }
            var res = Looter.AddURL(url, Context.User.Username, Context.User.Id.ToString(), tags);

            if (!res.success)
            {
                await ReplyAsync("Die Url is retarded.. glaub ich zumindest");

                return;
            }
            await ReplyAsync($"{Context.User} hat in {Context.Channel} einen Eintrag hinzugefügt [{res.index}]");

            if (Config.Current.DeleteAddRequests)
            {
                await Context.Channel.DeleteMessagesAsync(new[] { Context.Message.Id });
            }
        }