public CompetitionSetup(ELOService service, GuildService prefix, PatreonIntegration patreonIntegration, ELOMigrator migrator, LegacyIntegration legacy) { this.Prefix = prefix; PatreonIntegration = patreonIntegration; Migrator = migrator; Legacy = legacy; Service = service; }
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; }
//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); }
public UserCommands(ELOService service, PatreonIntegration prem) { Service = service; Premium = prem; }
public async Task GetRegisterLimit() { await SimpleEmbedAsync($"Current registration limit is a maximum of: {PatreonIntegration.GetRegistrationLimit(Context)}", Color.Blue); }
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); } }
public async Task ClaimPremiumAsync() { await PatreonIntegration.Claim(Context); }