Пример #1
0
        public async Task SetPatreonUrl([Remainder] string url)
        {
            var config = PremiumService.GetConfig();

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

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

            config.Enabled = !config.Enabled;
            PremiumService.SaveConfig(config);
            await ReplyAsync($"Premium Enabled: {config.Enabled}");
        }
Пример #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.");
        }