Beispiel #1
0
        public async Task SubRanks()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.helpCol
            };

            embed.Title = ("Sub Ranks");
            string desc = "Type " + BotConfig.Load().Prefix + "subrank add <rank> to be added to the sub ranks!";

            if (SubRanksSaves.Load().SubRanks > 1)
            {
                for (int i = 0; i < SubRanksSaves.Load().SubRanks; i++)
                {
                    desc = desc + "\n";
                    desc = desc + SubRanksSaves.Load().Ranks[i];
                }
            }
            else
            {
                desc = desc + "\n- Sub Ranks are to be added soon!";
            }

            embed.Description = (desc);

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task SettingsGraphicsRank(String rank = null)
        {
            await Context.Message.DeleteAsync();

            if (rank != null)
            {
                BotConfig config = new BotConfig();
                config = Update.UpdateConfig(config);
                config.GraphicsRank = rank;
                config.Save();

                var embed = new EmbedBuilder()
                {
                    Color = Colours.adminCol
                };
                embed.Title       = ("Settings Graphics Rank");
                embed.Description = ("Graphics rank has been set to " + rank + " successfully!");
                var message = await ReplyAsync("", false, embed.Build());

                await Delete.DelayDeleteEmbed(message, 30);
            }
            else
            {
                await errors.sendErrorTemp(Context.Channel, "You must specify a rank!", Colours.errorCol);
            }
        }
        public async Task SettingsToken(String token = null)
        {
            await Context.Message.DeleteAsync();

            if (token != null)
            {
                BotConfig config = new BotConfig();
                config       = Update.UpdateConfig(config);
                config.Token = token;
                config.Save();

                var embed = new EmbedBuilder()
                {
                    Color = Colours.adminCol
                };
                embed.Title       = ("Settings Token");
                embed.Description = ("Token has been set to " + token + " successfully!");

                var message = await ReplyAsync("", false, embed.Build());

                await Delete.DelayDeleteEmbed(message, 30);
            }
            else
            {
                await errors.sendErrorTemp(Context.Channel, "You must specify a token!", Colours.errorCol);
            }
        }
        public async Task HelpGen()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.helpCol
            };

            embed.Title       = ("Bruze MPG General Help");
            embed.Description = (BotConfig.Load().Prefix + "ping - I like ping pong" + "\n" +
                                 BotConfig.Load().Prefix + "bot info - Displays information about me!" + "\n" +
                                 BotConfig.Load().Prefix + "messages count - Shows how many messages have been sent in this discord!" + "\n" +
                                 BotConfig.Load().Prefix + "members count - Shows how many members are in this discord!" + "\n" +
                                 BotConfig.Load().Prefix + "ranks - Shows how many members are in each rank" + "\n" +
                                 BotConfig.Load().Prefix + "help - I think you know this command" + "\n" +
                                 BotConfig.Load().Prefix + "rank add <user|music|programming|graphics> - Used to set your rank" + "\n" +
                                 BotConfig.Load().Prefix + "rank remove <user|music|programming|graphics> - Used to remove the rank" + "\n" +
                                 BotConfig.Load().Prefix + "subranks - View all sub ranks" + "\n" +
                                 BotConfig.Load().Prefix + "subrank add <rank> - Join the sub rank" + "\n" +
                                 BotConfig.Load().Prefix + "subrank remove <rank> - Leave the sub rank");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
Beispiel #5
0
        public async Task ranks()
        {
            await Context.Message.DeleteAsync();

            var members     = BotConfig.Load().Members;
            var users       = RankSaves.Load().userCount;
            var music       = RankSaves.Load().musicCount;
            var programming = RankSaves.Load().programmingCount;
            var graphics    = RankSaves.Load().graphicsCount;
            var newbs       = RankSaves.Load().newMembersCount;

            var embed = new EmbedBuilder()
            {
                Color = Colours.generalCol
            };
            var usersField = new EmbedFieldBuilder()
            {
                Name = BotConfig.Load().UserRank.ToString() + ":", Value = users
            };
            var musicField = new EmbedFieldBuilder()
            {
                Name = BotConfig.Load().MusicRank.ToString() + ":", Value = music
            };
            var programmingField = new EmbedFieldBuilder()
            {
                Name = BotConfig.Load().ProgrammingRank.ToString() + ":", Value = programming
            };
            var graphicsField = new EmbedFieldBuilder()
            {
                Name = BotConfig.Load().GraphicsRank.ToString() + ":", Value = graphics
            };
            var newbsField = new EmbedFieldBuilder()
            {
                Name = "New", Value = "That leaves " + newbs.ToString() + " not in any rank yet!"
            };

            var footer = new EmbedFooterBuilder()
            {
                Text = "Requested by " + Context.User.Username
            };

            embed.Title       = ("Members Count");
            embed.Description = ("There are a total of " + members + " members in the discord, how many in each rank?");
            embed.AddField(usersField);
            embed.AddField(musicField);
            embed.AddField(programmingField);
            embed.AddField(graphicsField);
            embed.AddField(newbsField);
            embed.WithFooter(footer);
            embed.WithCurrentTimestamp();

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task ping()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.generalCol
            };

            embed.Title       = ("PING");
            embed.Description = ("PONG");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task HelpNew()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.helpCol
            };

            embed.Title       = ("Bruze MPG New Member Help");
            embed.Description = (BotConfig.Load().Prefix + "rank add <user|music|programming|graphics> - Used to set your rank to enter the full discord");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task membersCount()
        {
            await Context.Message.DeleteAsync();

            var members = BotConfig.Load().Members;

            var embed = new EmbedBuilder()
            {
                Color = Colours.generalCol
            };

            embed.Title       = ("Members Count");
            embed.Description = ("There are " + members + " members in the discord!");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task messagesCount()
        {
            await Context.Message.DeleteAsync();

            var messages = BotConfig.Load().Messages;

            var embed = new EmbedBuilder()
            {
                Color = Colours.generalCol
            };

            embed.Title       = ("Message Count");
            embed.Description = ("There has been " + messages + " messages since this feature was added!");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task Help()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.helpCol
            };

            embed.Title       = ("Bruze MPG Help");
            embed.Description = (BotConfig.Load().Prefix + "help new - New Member Help" + "\n" +
                                 BotConfig.Load().Prefix + "help general - General Commands Help" + "\n" +
                                 BotConfig.Load().Prefix + "help admin - Admin Commands Help");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task botInfo()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.generalCol
            };

            embed.Title       = ("Bot Info");
            embed.Description = ("Name: " + References.TITLE + "\n" +
                                 "Version: " + References.ID + "\n" +
                                 "Developer: " + References.DEV + "\n" +
                                 "Developer Website: " + References.DEVWEB);

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task HelpAdmin()
        {
            await Context.Message.DeleteAsync();

            var embed = new EmbedBuilder()
            {
                Color = Colours.helpCol
            };

            embed.Title       = ("Bruze MPG New Member Help");
            embed.Description = (BotConfig.Load().Prefix + "settings - View the current server config settings" + "\n" +
                                 BotConfig.Load().Prefix + "settings prefix <prefix> - Change the bot prefix" + "\n" +
                                 BotConfig.Load().Prefix + "settings token <token> - Change the bot token (IMPORTANT! DO NOT DO THIS UNLESS REQUIRED)" + "\n" +
                                 BotConfig.Load().Prefix + "settings newmember <rank> - Change the new user rank" + "\n" +
                                 BotConfig.Load().Prefix + "settings userrank <rank> - Change the user rank" + "\n" +
                                 BotConfig.Load().Prefix + "settings musicrank <rank> - Change the music rank" + "\n" +
                                 BotConfig.Load().Prefix + "settings programmingrank <rank> - Change the programming rank" + "\n" +
                                 BotConfig.Load().Prefix + "settings graphicsrank <rank> - Change the graphics rank" + "\n" +
                                 BotConfig.Load().Prefix + "subrank add <rank> - Add a sub rank (Max: " + SubRanksSaves.Load().MaxRanks + ")" + "\n");

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }
        public async Task Settings()
        {
            await Context.Message.DeleteAsync();

            string serverName      = "Bruze MPG Community";
            string token           = BotConfig.Load().Token;
            string prefix          = BotConfig.Load().Prefix;
            string newUserRank     = BotConfig.Load().NewMemberRank;
            string userRank        = BotConfig.Load().UserRank;
            string musicRank       = BotConfig.Load().MusicRank;
            string programmingRank = BotConfig.Load().ProgrammingRank;
            string graphicsRank    = BotConfig.Load().GraphicsRank;

            var embed = new EmbedBuilder()
            {
                Color = Colours.adminCol
            };
            var serverNameField = new EmbedFieldBuilder()
            {
                Name = "Server Name", Value = serverName
            };
            var tokenField = new EmbedFieldBuilder()
            {
                Name = "Bot Token", Value = token, IsInline = true
            };
            var prefixField = new EmbedFieldBuilder()
            {
                Name = "Bot Prefix", Value = prefix, IsInline = true
            };
            var newUserField = new EmbedFieldBuilder()
            {
                Name = "New User Rank", Value = newUserRank, IsInline = true
            };
            var userField = new EmbedFieldBuilder()
            {
                Name = "User Rank", Value = userRank, IsInline = true
            };
            var musicField = new EmbedFieldBuilder()
            {
                Name = "Music Rank", Value = musicRank, IsInline = true
            };
            var programmingField = new EmbedFieldBuilder()
            {
                Name = "Programming Rank", Value = programmingRank, IsInline = true
            };
            var graphicsField = new EmbedFieldBuilder()
            {
                Name = "Graphics Rank", Value = graphicsRank, IsInline = true
            };

            string lol    = "---------------------------------------------------------------------------------------------------";
            string lol1   = "-------------------------------------------------------------------------------------------------";
            var    title1 = new EmbedFieldBuilder()
            {
                Name = lol, Value = lol1
            };
            var title2 = new EmbedFieldBuilder()
            {
                Name = lol, Value = lol1
            };
            var title3 = new EmbedFieldBuilder()
            {
                Name = lol, Value = lol1
            };

            embed.Title       = ("Current Server Settings");
            embed.Description = ("Here are all the current server settings.");
            embed.AddField(serverNameField);
            embed.AddField(title1);
            embed.AddField(tokenField);
            embed.AddField(prefixField);
            embed.AddField(title2);
            embed.AddField(newUserField);
            embed.AddField(userField);
            embed.AddField(title3);
            embed.AddField(musicField);
            embed.AddField(programmingField);
            embed.AddField(graphicsField);

            var message = await Context.Channel.SendMessageAsync("", false, embed);

            await Delete.DelayDeleteEmbed(message, 30);
        }