//[RequireRoles(RoleCheckMode.Any, "ADMIN")] public async Task ViewGuildInfo(CommandContext ctx, string guildName) { try { var guild = await _guildService.GetGuild(guildName); var memberList = _embedContentBuilder.BuildMemberList(guild.Members); var embed = new DiscordEmbedBuilder(); embed.Title = "Guild Information"; embed.AddField("Name", guild.Name, true); embed.AddField("Status", guild.Status(), true); embed.AddField("Member count", guild.MemberCount.ToString(), true); embed.AddField("Open spots", guild.OpenSpots.ToString(), true); embed.AddField("Members", memberList); embed.Build(); await ctx.Channel.SendMessageAsync(embed).ConfigureAwait(false); } catch (Exception ex) { await ctx.Channel.SendMessageAsync(ex.Message).ConfigureAwait(false); } }
//[RequireRoles(RoleCheckMode.Any, "ADMIN")] public async Task ViewAllMembers(CommandContext ctx) { try { var members = await _guildMemberService.GetAllUsers().ConfigureAwait(false); var memberListString = _embedContentBuilder.BuildMemberList(members); var embed = new DiscordEmbedBuilder(); embed.Title = "Members"; embed.Description = memberListString; embed.Build(); await ctx.Channel.SendMessageAsync(embed).ConfigureAwait(false); } catch (Exception ex) { await ctx.Channel.SendMessageAsync(ex.Message).ConfigureAwait(false); } }