public DatabaseCommandContext(AatroxCommandContext ctx, AatroxDbContext context) { _ctx = ctx; _guilds = context.RequestRepository <IGetOrAddRepository <GuildEntity> >(); _users = context.RequestRepository <IGetOrAddRepository <UserEntity> >(); _leagueUsers = context.RequestRepository <IGetOrAddRepository <LeagueUserEntity> >(); _osuUsers = context.RequestRepository <IGetOrAddRepository <OsuUserEntity> >(); Database = context; }
public Paginator(AatroxCommandContext ctx, ImmutableArray <Page> pages) { Client = ctx.Bot; Channel = ctx.Channel; User = ctx.User; Pages = pages; _cursor = 0; _stopped = false; _hasPermission = ctx.Guild.CurrentMember.GetPermissionsFor((IGuildChannel)ctx.Channel).Has(Permission.ManageMessages) || ctx.Guild.CurrentMember.GetPermissionsFor((IGuildChannel)ctx.Channel).Has(Permission.Administrator); }