public SelfcareBotMain(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IOptions <BotOptions> botOptions, ISelfcareDbContext selfcareDb, ILogger <SelfcareBotMain> logger) { _selfcareDb = selfcareDb; _logger = logger; // Create discord client _discord = new DiscordClient( new DiscordConfiguration { Token = botOptions.Value.DiscordToken, TokenType = TokenType.Bot, LoggerFactory = loggerFactory } ); // Enable interactivity _discord.UseInteractivity( new InteractivityConfiguration { PollBehaviour = PollBehaviour.KeepEmojis } ); // Register commands _discord.UseCommandsNext( new CommandsNextConfiguration { StringPrefixes = botOptions.Value.CommandPrefixes, Services = serviceProvider } ) .RegisterCommands(Assembly.GetExecutingAssembly()); }
public UserService(ISelfcareDbContext selfcareDb) { _selfcareDb = selfcareDb; }
public HydrationLeaderboard(ISelfcareDbContext selfcareDb, IUserService userService) { _selfcareDb = selfcareDb; _userService = userService; }