public static bool CreateRole(DSharpPlus.DiscordClient client, ulong GuildID, string RoleName, int r, int g, int b)
            {
                DSharpPlus.Entities.DiscordGuild dguild = client.GetGuildAsync(GuildID).Result;

                dguild.CreateRoleAsync(RoleName, DSharpPlus.Permissions.None, new DSharpPlus.Entities.DiscordColor(r, g, b));
                return(true);
            }
 private static async Task AddNewRoleOverwrite(
     ulong overwriteId,
     DSharpPlus.Entities.DiscordGuild guild,
     DSharpPlus.Entities.DiscordChannel channel)
 {
     var role = guild.GetRole(overwriteId);
     await channel.AddOverwriteAsync(role);
 }
        private static async Task AddNewMemberOverwrite(
            ulong overwriteId,
            DSharpPlus.Entities.DiscordGuild guild,
            DSharpPlus.Entities.DiscordChannel channel)
        {
            var member = await guild.GetMemberAsync(overwriteId);

            await channel.AddOverwriteAsync(member);
        }
        private static DiscordGuild ConvertGuildFromDSharpPlus(
            DSharpPlus.Entities.DiscordGuild guild,
            DSharpPlus.Entities.DiscordMember member)
        {
            var perms = member.Roles
                        .Select(r => r.Permissions)
                        .Aggregate((p1, p2) => p1 | p2);

            return(new DiscordGuild(
                       guild.Id,
                       guild.Name,
                       perms.HasPermission(DSharpPlus.Permissions.Administrator)
                       ));
        }