protected override async ValueTask <DiscordCommandContext> GetCommandContextAsync(CachedUserMessage message, IPrefix prefix) { var ctx = new AbfCommandContext(this, message, prefix); await ctx.PrepareAsync(); return(ctx); }
public DatabaseCommandContext(AbfCommandContext ctx, AbfDbContext context) { _ctx = ctx; _users = context.RequestRepository <IGetOrAddRepository <User> >(); _raids = context.RequestRepository <IRepository <Raid> >(); if (!(_ctx.Guild is null)) { _guilds = context.RequestRepository <IGetOrAddRepository <Guild> >(); } Database = context; }