Esempio n. 1
0
 public FlipCoinCommands(IDataCache data, ICurrencyService cs, DbService db,
                         GamblingConfigService gss) : base(gss)
 {
     _images = data.LocalImages;
     _cs     = cs;
     _db     = db;
 }
Esempio n. 2
0
        public PlantPickService(DbService db, CommandHandler cmd, IBotStrings strings,
                                IDataCache cache, FontProvider fonts, ICurrencyService cs,
                                CommandHandler cmdHandler, DiscordSocketClient client, GamblingConfigService gss)
        {
            _db         = db;
            _strings    = strings;
            _images     = cache.LocalImages;
            _fonts      = fonts;
            _cs         = cs;
            _cmdHandler = cmdHandler;
            _rng        = new NadekoRandom();
            _client     = client;
            _gss        = gss;

            cmd.OnMessageNoTrigger += PotentialFlowerGeneration;
            using (var uow = db.GetDbContext())
            {
                var guildIds = client.Guilds.Select(x => x.Id).ToList();
                var configs  = uow._context.Set <GuildConfig>()
                               .AsQueryable()
                               .Include(x => x.GenerateCurrencyChannelIds)
                               .Where(x => guildIds.Contains(x.GuildId))
                               .ToList();

                _generationChannels = new ConcurrentHashSet <ulong>(configs
                                                                    .SelectMany(c => c.GenerateCurrencyChannelIds.Select(obj => obj.ChannelId)));
            }
        }
Esempio n. 3
0
 public AnimalRacingCommands(ICurrencyService cs, DiscordSocketClient client,
                             GamblingConfigService gamblingConf, GamesConfigService gamesConf) : base(gamblingConf)
 {
     _cs        = cs;
     _client    = client;
     _gamesConf = gamesConf;
 }
Esempio n. 4
0
 public WaifuService(DbService db, ICurrencyService cs, IDataCache cache,
                     GamblingConfigService gss)
 {
     _db    = db;
     _cs    = cs;
     _cache = cache;
     _gss   = gss;
 }
Esempio n. 5
0
 public Gambling(DbService db, ICurrencyService currency,
                 IDataCache cache, DiscordSocketClient client,
                 DownloadTracker tracker, GamblingConfigService configService) : base(configService)
 {
     _db          = db;
     _cs          = currency;
     _cache       = cache;
     _client      = client;
     _enUsCulture = new CultureInfo("en-US", false).NumberFormat;
     _enUsCulture.NumberDecimalDigits  = 0;
     _enUsCulture.NumberGroupSeparator = " ";
     _tracker       = tracker;
     _configService = configService;
 }
Esempio n. 6
0
        public CurrencyEventsService(DiscordSocketClient client,
                                     IBotCredentials creds, ICurrencyService cs,
                                     IHttpClientFactory http, GamblingConfigService configService)
        {
            _client        = client;
            _cs            = cs;
            _creds         = creds;
            _http          = http;
            _configService = configService;

            if (_client.ShardId == 0)
            {
                Task t = BotlistUpvoteLoop();
            }
        }
Esempio n. 7
0
        public PatreonRewardsService(IBotCredentials creds, DbService db,
                                     ICurrencyService currency, IHttpClientFactory factory,
                                     DiscordSocketClient client, GamblingConfigService gamblingConfigService)
        {
            _creds    = creds;
            _db       = db;
            _currency = currency;
            _gamblingConfigService = gamblingConfigService;
            _httpFactory           = factory;
            _client = client;

            if (client.ShardId == 0)
            {
                _updater = new Timer(async _ => await RefreshPledges().ConfigureAwait(false),
                                     null, TimeSpan.Zero, Interval);
            }
        }
Esempio n. 8
0
 public SlotCommands(IDataCache data, ICurrencyService cs, GamblingConfigService gamb) : base(gamb)
 {
     _images = data.LocalImages;
     _cs     = cs;
 }
Esempio n. 9
0
 public CurrencyService(DbService db, DiscordSocketClient c, GamblingConfigService gss)
 {
     _db  = db;
     _gss = gss;
     _bot = c.CurrentUser;
 }
Esempio n. 10
0
 public WaifuClaimCommands(GamblingConfigService gamblingConfService) : base(gamblingConfService)
 {
 }
 public PlantPickCommands(LogCommandService logService, GamblingConfigService gss) : base(gss)
 {
     this.logService = logService;
 }
Esempio n. 12
0
 public BlackJackCommands(ICurrencyService cs, DbService db,
                          GamblingConfigService gamblingConf) : base(gamblingConf)
 {
     _cs = cs;
     _db = db;
 }
Esempio n. 13
0
 public CurrencyEventsCommands(GamblingConfigService gamblingConf) : base(gamblingConf)
 {
 }
Esempio n. 14
0
 public WheelOfFortuneCommands(ICurrencyService cs, DbService db, GamblingConfigService gamblingConfService)
     : base(gamblingConfService)
 {
     _cs = cs;
     _db = db;
 }
Esempio n. 15
0
 public Connect4Commands(DiscordSocketClient client, ICurrencyService cs, GamblingConfigService gamb)
     : base(gamb)
 {
     _client = client;
     _cs     = cs;
 }
Esempio n. 16
0
 public Xp(DownloadTracker tracker, GamblingConfigService gss)
 {
     _tracker = tracker;
     _gss     = gss;
 }
Esempio n. 17
0
 public GamblingConfigMigrator(DbService dbService, GamblingConfigService gss)
 {
     _db  = dbService;
     _gss = gss;
 }
Esempio n. 18
0
 public CurrencyRaffleCommands(GamblingConfigService gamblingConfService) : base(gamblingConfService)
 {
 }
Esempio n. 19
0
 protected GamblingModule(GamblingConfigService gambService)
 {
     _lazyConfig = new Lazy <GamblingConfig>(() => gambService.Data);
 }
Esempio n. 20
0
 protected GamblingSubmodule(GamblingConfigService gamblingConfService) : base(gamblingConfService)
 {
 }
Esempio n. 21
0
 public ShopCommands(DbService db, ICurrencyService cs, GamblingConfigService gamblingConf)
     : base(gamblingConf)
 {
     _db = db;
     _cs = cs;
 }