예제 #1
0
        protected override async ValueTask <DiscordCommandContext> GetCommandContextAsync(CachedUserMessage message,
                                                                                          IPrefix prefix)
        {
            var ctx = new AatroxCommandContext(this, message, prefix);
            await ctx.PrepareAsync();

            return(ctx);
        }
예제 #2
0
 public static LocalEmbedBuilder New(AatroxCommandContext ctx)
 {
     return(new LocalEmbedBuilder
     {
         Timestamp = DateTimeOffset.Now,
         Footer = new LocalEmbedFooterBuilder
         {
             Text = $"Executed by {ctx.Member.Name}#{ctx.Member.Discriminator}",
             IconUrl = ctx.User.GetAvatarUrl()
         },
         Color = Color.Goldenrod
     });
 }
예제 #3
0
        public static Task <Paginator> CreatePaginatorAsync(AatroxCommandContext context, ImmutableArray <Page> pages, bool extraEmojis = true)
        {
            var paginator = new Paginator(context, pages);

            return(paginator.SendAsync(extraEmojis));
        }