Beispiel #1
0
        public async Task SetPatreonUrl([Remainder] string url)
        {
            var config = PremiumService.GetConfig();

            config.PageUrl = url;
            PremiumService.SaveConfig(config);
            await ReplyAsync($"Set.");
        }
Beispiel #2
0
        public async Task SetPatreonGuildInvite([Remainder] string url)
        {
            var config = PremiumService.GetConfig();

            config.ServerInvite = url;
            PremiumService.SaveConfig(config);
            await ReplyAsync($"Set.");
        }
Beispiel #3
0
        public async Task TogglePremium()
        {
            var config = PremiumService.GetConfig();

            config.Enabled = !config.Enabled;
            PremiumService.SaveConfig(config);
            await ReplyAsync($"Premium Enabled: {config.Enabled}");
        }
Beispiel #4
0
        public async Task AddRoleAsync(SocketRole role, int maxCount)
        {
            var config = PremiumService.GetConfig();

            config.GuildId = Context.Guild.Id;
            config.Roles.Add(role.Id, new PatreonIntegration.PatreonConfig.ELORole
            {
                RoleId = role.Id,
                MaxRegistrationCount = maxCount
            });
            PremiumService.SaveConfig(config);
            await ReplyAsync("Done.");
        }
Beispiel #5
0
        public async Task ShowRolesAsync()
        {
            var config = PremiumService.GetConfig();

            await SimpleEmbedAsync("Roles:\n" + string.Join("\n", config.Roles.Select(x => MentionUtils.MentionRole(x.Key) + " - " + x.Value.MaxRegistrationCount)));
        }