public async Task SetPatreonUrl([Remainder] string url) { var config = PremiumService.GetConfig(); config.PageUrl = url; PremiumService.SaveConfig(config); await ReplyAsync($"Set."); }
public async Task SetPatreonGuildInvite([Remainder] string url) { var config = PremiumService.GetConfig(); config.ServerInvite = url; PremiumService.SaveConfig(config); await ReplyAsync($"Set."); }
public async Task TogglePremium() { var config = PremiumService.GetConfig(); config.Enabled = !config.Enabled; PremiumService.SaveConfig(config); await ReplyAsync($"Premium Enabled: {config.Enabled}"); }
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."); }
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))); }