Пример #1
0
        public static async Task SpamAsync(MessageCreateEventArgs e, string message)
        {
            FormatMessage.FormatStringAdvanced(6, message); // Format the string so we can use get only the message
            var msg   = FormatMessage.AdvancedMessage;      // gets the message
            var times = FormatMessage.AdvancedTimes;        // gets the times it will run

            for (var i = 0; i < times; i++)
            {
                await e.Message.RespondAsync(msg).ConfigureAwait(false);

                Thread.Sleep(665); // waits .83 seconds due to discordsAPI call rate
            }
        }
Пример #2
0
        public static async Task MassDmSpamAsync(string input)
        {
            FormatMessage.FormatStringAdvanced(8, input);
            var msg   = FormatMessage.AdvancedMessage;
            var times = FormatMessage.AdvancedTimes;
            var dc    = Program.DiscordClient;

            foreach (var dmc in dc.PrivateChannels) // Gets all the dm channels you have
            {
                for (var i = 0; i < times; i++)
                {
                    await dmc.SendMessageAsync(msg).ConfigureAwait(false);

                    Thread.Sleep(665); // waits .83 seconds due to discordsAPI call rate
                }
            }
        }
Пример #3
0
                                             "```"; // Our customized help command
        public static void Custom()
        {
            var rand         = new Random();
            var correctGuess = rand.Next(1, 11);
            var roast        = rand.Next(1, Roast.Roasts.Count);

            Program.DiscordClient.MessageCreated += async e =>
            {
                var discordId = e.Message.Author.Id;  // gets discordIDs
                var id        = discordId.ToString(); // parses discordID to string
                var message   = e.Message.Content;    // Custom commands use the stuff inside this comment
                if (RoleProperties.BannedList.Contains(id))
                {
                    return;
                }
                if (Program.Selfbot || !Program.Bot.Contains(id))
                {
                    // Fun commands
                    if (e.Message.Content.Contains("source code")) // Anti-Paster code for fun
                    {
                        await e.Message.RespondAsync("You Dirty Twat Dont C&P!").ConfigureAwait(false);
                    }

                    if (e.Message.Content.Contains("tranny")) // Anti-Paster code for fun
                    {
                        await e.Message.RespondAsync("Dont say that word please!").ConfigureAwait(false);
                    }

                    // User Commands
                    if (e.Message.Content.StartsWith(Command("test")))
                    {
                        await e.Message.RespondAsync("Test").ConfigureAwait(false);
                    }

                    if (e.Message.Content.StartsWith(Command("date")))
                    {
                        await e.Message.RespondAsync(DateTime.Now.ToLongDateString()).ConfigureAwait(false);
                    }

                    if (e.Message.Content.StartsWith(Command("help")) || e.Message.Content.Contains(Command("cmds")))
                    {
                        await e.Message.RespondAsync(HelpCommand).ConfigureAwait(false);
                    }

                    if (e.Message.Content.StartsWith(Command("msg"))) // if the message has the command anywhere in the code it will run
                    {
                        FormatMessage.FormatString(5, message);       // Formats the string to get just the message
                        var msg = FormatMessage.Output;               // sets the strings output to the message
                        await e.Message.RespondAsync(msg).ConfigureAwait(false);
                    }

                    if (e.Message.Content.StartsWith(Command("info")))
                    {
                        await e.Message.RespondAsync(@"Find My Source At: " + "\n" + "https://github.com/Xenial-PC/ClientSideSelfBot").ConfigureAwait(false);
                    }

                    if (e.Message.Content.StartsWith(Command("roast")))
                    {
                        FormatMessage.FormatString(7, message);                                             // Formats the string to get just the name
                        var msg = FormatMessage.Output;                                                     // sets the strings output to the message
                        await e.Message.RespondAsync($"{msg} {Roast.Roasts[roast]}").ConfigureAwait(false); // responds with the name and the roast

                        roast = rand.Next(1, Roast.Roasts.Count);                                           // sets the number to a new roast
                    }

                    // Temp Commands
                    if (Program.Owner.Contains(id) || Program.Selfbot || RoleProperties.AdminList.Contains(id) || RoleProperties.ModList.Contains(id) || RoleProperties.TrustedList.Contains(id) || RoleProperties.TempList.Contains(id))
                    {
                    }

                    // Trusted Commands
                    if (Program.Owner.Contains(id) || Program.Selfbot || RoleProperties.AdminList.Contains(id) || RoleProperties.ModList.Contains(id) || RoleProperties.TrustedList.Contains(id))
                    {
                        if (e.Message.Content.StartsWith(Command("ping")))
                        {
                            await e.Message.RespondAsync("Pinged!").ConfigureAwait(false);

                            Console.Beep(); // Makes a beep sound through the console on the hosts pc
                        }
                        if (e.Message.Content.StartsWith(Command("game")))
                        {
                            if (e.Message.Content.Contains(Command("game " + correctGuess)))
                            {
                                await e.Message.RespondAsync("Correct!").ConfigureAwait(false);

                                correctGuess = rand.Next(1, 11);
                                Sleep();
                            }
                            else
                            {
                                await e.Message.RespondAsync("Wrong! Game Ended").ConfigureAwait(false);

                                correctGuess = rand.Next(1, 11);
                            }
                        }
                    }

                    // Mod Commands
                    if (Program.Owner.Contains(id) || Program.Selfbot || RoleProperties.AdminList.Contains(id) || RoleProperties.ModList.Contains(id))
                    {
                    }

                    // Admin Commands
                    if (Program.Owner.Contains(id) || Program.Selfbot || RoleProperties.AdminList.Contains(id))
                    {
                        if (e.Message.Content.StartsWith(Command("count")))
                        {
                            FormatMessage.FormatStringInt(7, message);
                            var minNum = FormatMessage.IntMin; // gets the min output from formatting the message
                            var maxNum = FormatMessage.IntMax; // gets the max output from formatting the message
                            for (var x = minNum; x < maxNum + 1; x++)
                            {
                                await e.Message.RespondAsync(x.ToString()).ConfigureAwait(false);

                                Thread.Sleep(665); // .655 seconds wait time due to discords api call rate
                            }
                        }
                        if (e.Message.Content.StartsWith(Command("add")))
                        {
                            FormatMessage.FormatStrings(8, e.Message.Content);
                            if (e.Message.Content.Contains("admin"))
                            {
                                AddUser(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                                RoleProperties.AdminList.Add(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                            }
                            else if (e.Message.Content.Contains("mod"))
                            {
                                AddUser(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                                RoleProperties.ModList.Add(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                            }
                            else if (e.Message.Content.Contains("trusted"))
                            {
                                AddUser(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                                RoleProperties.TrustedList.Add(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                            }
                            else if (e.Message.Content.Contains("temp"))
                            {
                                AddUser(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                                RoleProperties.TempList.Add(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                            }
                        }
                        if (e.Message.Content.StartsWith(Command("ban")))
                        {
                            FormatMessage.FormatString(8, e.Message.Content);
                            AddUser(FormatMessage.AdvancedOutputOne.Trim().TrimEnd('>'));
                            await e.Message.RespondAsync($"Banned! <@!{FormatMessage.Output}").ConfigureAwait(false);

                            RoleProperties.BannedList.Add(FormatMessage.Output.Trim().TrimEnd('>'));
                        }
                    }

                    // Owner Commands
                    if (Program.Owner.Contains(id) || Program.Selfbot)
                    {
                        if (e.Message.Content.StartsWith(Command("spam")))
                        {
                            await MessageSpammer.SpamAsync(e, message).ConfigureAwait(false);
                        }
                        if (e.Message.Content.StartsWith(Command("mass.delete.dm")))
                        {
                            await MassCommands.MassDmMessageDeleteAsync().ConfigureAwait(false);
                        }
                        if (e.Message.Content.StartsWith(Command("mass.dm")))
                        {
                            await MessageSpammer.MassDmSpamAsync(message).ConfigureAwait(false);
                        }
                        if (e.Message.Content.StartsWith(Command("mass.delete.msg")))
                        {
                            await MassCommands.MassMessageDeleteAsync(e).ConfigureAwait(false);
                        }
                    }
                }
            };
        }