Esempio n. 1
0
 public CompetitionSetup(ELOService service, GuildService prefix, PatreonIntegration patreonIntegration, ELOMigrator migrator, LegacyIntegration legacy)
 {
     this.Prefix        = prefix;
     PatreonIntegration = patreonIntegration;
     Migrator           = migrator;
     Legacy             = legacy;
     Service            = service;
 }
Esempio n. 2
0
 public Developer(IDatabase database, Random random, ELOService service, PatreonIntegration prem, ELOMigrator migrator, LocalManagementService local)
 {
     Database       = database;
     Random         = random;
     Service        = service;
     PremiumService = prem;
     Migrator       = migrator;
     Local          = local;
 }
Esempio n. 3
0
 //TODO: Event hook for player joins/updates?
 public ELOService(IDatabase database, DiscordShardedClient client, PatreonIntegration premium)
 {
     Database                 = database;
     Client                   = client;
     Premium                  = premium;
     Client.ReactionAdded    += ReactiveRegistration;
     Client.ChannelDestroyed += ChannelDeleted;
     //Due in 1 minute, repeat every 6 hours
     CompetitionUpdateTimer = new Timer(UpdateCompetitionSetups, null, 60000, 1000 * 60 * 60 * 6);
 }
Esempio n. 4
0
 public UserCommands(ELOService service, PatreonIntegration prem)
 {
     Service = service;
     Premium = prem;
 }
Esempio n. 5
0
 public async Task GetRegisterLimit()
 {
     await SimpleEmbedAsync($"Current registration limit is a maximum of: {PatreonIntegration.GetRegistrationLimit(Context)}", Color.Blue);
 }
Esempio n. 6
0
        public async Task RedeemLegacyTokenAsync([Remainder] string token = null)
        {
            if (token == null)
            {
                await SimpleEmbedAsync("This is used to redeem tokens that were created using the old ELO version.", Color.Blue);

                return;
            }

            if (Migrator.RedeemToken(Context.Guild.Id, token))
            {
                await SimpleEmbedAsync("Token redeemed.", Color.Green);
            }
            else
            {
                await SimpleEmbedAsync($"Invalid token provided, if you believe this is a mistake please contact support at: {PatreonIntegration.GetConfig().ServerInvite}", Color.Red);
            }
        }
Esempio n. 7
0
 public async Task ClaimPremiumAsync()
 {
     await PatreonIntegration.Claim(Context);
 }