public ChannelsController(ProxyDataContext db, DiscordHelper discordHelper, IConfiguration cfg, WebhookCache webhookCache) { this.db = db; this.discordHelper = discordHelper; this.cfg = cfg; this.webhookCache = webhookCache; }
public ProxiesController(ProxyDataContext db, IConfiguration cfg, DiscordHelper discordHelper, AvatarHelper avatarHelper, ILogger <ProxiesController> logger) { this.db = db; this.cfg = cfg; this.discordHelper = discordHelper; this.avatarHelper = avatarHelper; this.logger = logger; }
public AvatarHelper(ProxyDataContext db, IConfiguration cfg) { this.db = db; this.cfg = cfg; AvatarPath = !string.IsNullOrWhiteSpace(cfg["Discord:avatar-path"]) ? cfg["Discord:avatar-path"] : Path.Combine(Environment.GetEnvironmentVariable("home"), "dmrp", "avatars"); }
private static async Task <BotUser> GetUser(ProxyDataContext db, BotUser botUser) { var dbUser = await db.BotUsers .Include(u => u.Channels).ThenInclude(c => c.Channel) .Include(u => u.Proxies) .FirstOrDefaultAsync(u => u.Id == botUser.Id); return(dbUser); }
public UsersController(ProxyDataContext db, IConfiguration cfg, DiscordHelper discordHelper) { this.db = db; this.cfg = cfg; this.discordHelper = discordHelper; }
public AvatarController(ProxyDataContext db, IConfiguration cfg, AvatarHelper avatarHelper) { this.db = db; this.cfg = cfg; this.avatarHelper = avatarHelper; }
public RequiresDiscordFilterImpl(DiscordHelper discordHelper, ProxyDataContext db) { this.discordHelper = discordHelper; this.db = db; }