Пример #1
0
        public async Task Filters(CommandContext ctx)
        {
            var getDmTask = ctx.CreateDmAsync();
            var embed     = new DiscordEmbedBuilder {
                Description = "List of recognized tokens in each filter category", Color = Config.Colors.Help
            }
            .AddField("Statuses", DicToDesc(ApiConfig.Statuses))
            .AddField("Release types", DicToDesc(ApiConfig.ReleaseTypes))
            .Build();
            var dm = await getDmTask.ConfigureAwait(false);

            await dm.SendMessageAsync(embed : embed).ConfigureAwait(false);
        }
Пример #2
0
 public static Task <DiscordChannel> GetChannelForSpamAsync(this CommandContext ctx)
 {
     return(LimitedToSpamChannel.IsSpamChannel(ctx.Channel) ? Task.FromResult(ctx.Channel) : ctx.CreateDmAsync());
 }