Esempio n. 1
0
        private async Task CheckCaseEntities(SocketGuild guild, ILiteCollection <CaseEntity> collection)
        {
            var caseEntites = collection.Find(entity => entity.GuildId == guild.Id);

            foreach (var entity in caseEntites)
            {
                switch (entity.CaseType)
                {
                case CaseType.Ban:
                    try
                    {
                        var ban = await guild.GetBanAsync(entity.UserId);

                        if (ban == null)
                        {
                            throw new Exception();
                        }
                    }
                    catch
                    {
                        await guild.AddBanAsync(entity.UserId, 0, entity.Reason);
                    }
                    break;
                }
            }
        }
Esempio n. 2
0
        private Task HandleJoinedGuild(SocketGuild guild)
        {
            return(Task.Run(async() =>
            {
                Logger.Log(LogSeverity.Debug, $"Event", "Joined Guild");
                var blacklists = await _blaclistRepo.AllAsync();

                var isBlacklistedGuild = blacklists.Any(x => x.GuildIds.Any(y => y == guild.Id));

                foreach (var guildUser in (await(guild as IGuild).GetUsersAsync()).Where(x => blacklists.Any(y => y.UserId == x.Id)))
                {
                    try
                    {
                        await guild.AddBanAsync(guildUser);
                    }
                    catch
                    {
                        if (guild.OwnerId == guildUser.Id && !isBlacklistedGuild)
                        {
                            await _blaclistRepo.AddGuildAsync(guildUser.Id, guild.Id);
                            await guild.LeaveAsync();
                        }
                    }
                }

                if (isBlacklistedGuild)
                {
                    await guild.LeaveAsync();
                }
            }));
        }
Esempio n. 3
0
        public Task ExecuteAsync(SocketUserMessage msg, string[] parameters)
        {
            Task.Run(async() =>
            {
                if (parameters.Length < 2)
                {
                    return;
                }

                string targetId        = msg.MentionedUsers.Count == 1 ? msg.MentionedUsers.First().Id.ToString() : parameters[0];
                SocketGuild server     = ((SocketGuildChannel)msg.Channel).Guild;
                SocketGuildUser target = server.Users.FirstOrDefault(x => x.Id.ToString() == targetId);

                if (target == null)
                {
                    await msg.Channel.SendMessageAsync($"Correct Usage: `;;ban <@username> (reason)`");
                    return;
                }

                var allBans   = await server.GetBansAsync();
                bool isBanned = allBans.Any(x => x.User.Id == target.Id);

                if (!isBanned)
                {
                    var senderHighest = ((SocketGuildUser)msg.Author).Hierarchy;

                    if (target.Hierarchy < senderHighest)
                    {
                        try
                        {
                            var dmChannel = await target.GetOrCreateDMChannelAsync();
                            await dmChannel.SendMessageAsync($"You have been banned from **{server.Name}** by Moderator **{msg.Author}**. Reason: **{String.Join(" ", parameters.Skip(1))}**");
                        }
                        catch (Exception e)
                        {
                            await msg.Author.GetOrCreateDMChannelAsync();
                            await msg.Author.SendMessageAsync($"Failed to send DM to **{target.Username}.\nError message: {e.Message}");
                        }

                        var TextChannelLogs = client.GetChannel(353561970038931458) as SocketTextChannel;

                        EmbedBuilder eb = new EmbedBuilder();

                        eb.Color = Color.Red;

                        eb.AddField("Case:", $"{Name}");
                        eb.AddField("Target", $"{target.Mention}");
                        eb.AddField($"Moderator: ", $"{msg.Author.Mention}");
                        eb.AddField($"Reason:", $"{String.Join(" ", parameters.Skip(1))}");

                        await TextChannelLogs.SendMessageAsync("", embed: eb);

                        await server.AddBanAsync(target);
                        await msg.Channel.SendMessageAsync($"**{target.Username}** has been banned by Moderator **{msg.Author}**. Reason: **{String.Join(" ", parameters.Skip(1))}**");
                    }
                }
            });
            return(Task.CompletedTask);
        }
Esempio n. 4
0
        public async Task <string> Ban(SocketGuild guild, ulong userId, TimeSpan?length = null)
        {
            await banRepo.Ban(guild.Id, userId, length);

            await guild.AddBanAsync(userId);

            var user = guild.GetUser(userId);

            return($"{Formatter.FullName(user, true)} banned{(length.HasValue ? $" for{Formatter.TimespanToString(length.Value)}" : string.Empty)}.");
        }
Esempio n. 5
0
        public async Task ExecuteAsync(SocketUserMessage msg, string[] parameters)
        {
            if (parameters.Length < 2 || true)
            {
                return;
            }

            string          targetId = msg.MentionedUsers.Count == 1 ? msg.MentionedUsers.First().Id.ToString() : parameters[0];
            SocketGuild     server   = ((SocketGuildChannel)msg.Channel).Guild;
            SocketGuildUser target   = server.Users.FirstOrDefault(x => x.Id.ToString() == targetId);

            if (target == null)
            {
                await msg.Channel.SendMessageAsync("No users found");

                return;
            }

            var allBans = await server.GetBansAsync();

            bool isBanned = allBans.Any(x => x.User.Id == target.Id);

            if (!isBanned)
            {
                var senderHighest = ((SocketGuildUser)msg.Author).Hierarchy;

                if (target.Hierarchy < senderHighest)
                {
                    await server.AddBanAsync(target);

                    await msg.Channel.SendMessageAsync($"**{target.Username}** has been banned by Moderator **{msg.Author}**. Reason: **{String.Join(" ", parameters.Skip(1))}**");

                    try
                    {
                        var dmChannel = await target.GetOrCreateDMChannelAsync();

                        await dmChannel.SendMessageAsync($"You have been banned from **{server.Name}** by Moderator **{msg.Author}** for **{String.Join(" ", parameters.Skip(1))}**");
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine($"Failed to send PM to banned user.\nError message: {e.Message}");
                    }
                }
            }
        }
        public async Task Ban(SocketGuildUser user = null, [Remainder] string reason = "")
        {
            SocketGuild     gld    = Context.Guild as SocketGuild;
            SocketRole      mods   = gld.Roles.FirstOrDefault(x => x.Id == 311889967679012864) as SocketRole;
            SocketRole      owner  = gld.Roles.FirstOrDefault(x => x.Id == 257984497071554560) as SocketRole;
            SocketGuildUser Author = Context.User as SocketGuildUser;

            if (Author.Roles.Contains(mods) || Author.Roles.Contains(owner) || !(Context.Channel.Id == 326078054948667393))
            {
                if (gld.Users.Contains(user))
                {
                    if (user.Id == 348505747828506624)
                    {
                        await ReplyAsync("How about, NO!");
                    }
                    if (user == null)
                    {
                        await ReplyAsync("Please specify a user to ban!"); return;
                    }
                    else
                    {
                        await ReplyAsync($"{user.Mention} has been banned from **{gld.Name}**");

                        await gld.AddBanAsync(user);

                        SocketTextChannel log = gld.GetChannel(423526041143738368) as SocketTextChannel;
                        await log.SendMessageAsync("", false, new EmbedBuilder
                        {
                            Color        = Color.Red,
                            Title        = "__**Banned User**__",
                            Description  = $"**{Author.Mention} banned user {user.Mention} from the server for reason:** {reason}",
                            ThumbnailUrl = "https://i0.wp.com/pcpilotscrew.com/wp-content/uploads/2018/03/pcpi2_ytlogo512.png?resize=120%2C120&ssl=1",
                            Timestamp    = DateTime.Now,
                        }.Build());
                    }
                }
                else
                {
                    await ReplyAsync("User does not exist in this guild");
                }
            }
        }
Esempio n. 7
0
        private async static Task <Task> ReadyApp()
        {
            Console.Clear();
            Console.Title = "Discord Kira-Tool";
            Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
            Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
            Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
            Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
            Console.WriteLine("--------------------------------------" + Environment.NewLine, System.Drawing.Color.MediumPurple);
            Console.WriteLine("[1] Twitch Presence   #####   [2] Playing Presence   ####   [3] Watching Presence   ####   [4] Listening Presence" + Environment.NewLine, System.Drawing.Color.HotPink);
            Console.WriteLine("[5] Envoyer un message   #####   [6] Envoyer un embed   ####   [7] Bannir un utilisateur   ####   [8] Débannir un utilisateur" + Environment.NewLine, System.Drawing.Color.HotPink);


            string up = Console.ReadLine();

            if (up == "1")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Twitch Presence";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Si vous voulez supprimer votre présence il suffit de ne rien écrire et de presser \"Entrée\"" + Environment.NewLine, System.Drawing.Color.Cyan);
                Console.WriteLine("Veuillez saisir le message de votre présence :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string rpc = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Veuillez saisir votre lien twitch :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string link = Console.ReadLine();

                await _client.SetGameAsync(rpc, link, ActivityType.Streaming);

                Console.WriteLine(Environment.NewLine + "Votre présence a été changé avec succès !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "2")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Playing Presence";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Si vous voulez supprimer votre présence il suffit de ne rien écrire et de presser \"Entrée\"" + Environment.NewLine, System.Drawing.Color.Cyan);
                Console.WriteLine("Veuillez saisir le message de votre présence :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string rpc = Console.ReadLine();

                await _client.SetActivityAsync(new Game(rpc, ActivityType.Playing));

                Console.WriteLine(Environment.NewLine + "Votre présence a été changé avec succès !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "3")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Watching Presence";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Si vous voulez supprimer votre présence il suffit de ne rien écrire et de presser \"Entrée\"" + Environment.NewLine, System.Drawing.Color.Cyan);
                Console.WriteLine("Veuillez saisir le message de votre présence :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string rpc = Console.ReadLine();

                await _client.SetActivityAsync(new Game(rpc, ActivityType.Watching));

                Console.WriteLine(Environment.NewLine + "Votre présence a été changé avec succès !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "4")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Listening Presence";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Si vous voulez supprimer votre présence il suffit de ne rien écrire et de presser \"Entrée\"" + Environment.NewLine, System.Drawing.Color.Cyan);
                Console.WriteLine("Veuillez saisir le message de votre présence :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string rpc = Console.ReadLine();

                await _client.SetActivityAsync(new Game(rpc, ActivityType.Listening));

                Console.WriteLine(Environment.NewLine + "Votre présence a été changé avec succès !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "5")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Envoyer un message";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Veuillez saisir votre message à envoyer :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string message = "";
                message = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Veuillez saisir l'id du channel où envoyer le message :" + Environment.NewLine);
                ulong channel = ulong.Parse(Console.ReadLine());

                var chnl = _client.GetChannel(channel) as IMessageChannel;
                await chnl.SendMessageAsync(message);

                Console.WriteLine(Environment.NewLine + "Votre message a bien été envoyer !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "6")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Envoyer un embed";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Veuillez saisir l'id du channel où envoyer le message :" + Environment.NewLine, System.Drawing.Color.Cyan);
                ulong channel = ulong.Parse(Console.ReadLine());
                var   chnl    = _client.GetChannel(channel) as IMessageChannel;
                Console.WriteLine(Environment.NewLine + "Veuillez saisir un titre à l'embed (si vous ne voulez pas en mettre il suffit de ne rien écrire et de presser \"Entrée\") :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string titre = "";
                titre = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Veuillez saisir la description de l'embed (si vous ne voulez pas en mettre il suffit de ne rien écrire et de presser \"Entrée\") :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string message = "";
                message = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Veuillez saisir l'image de l'embed (si vous ne voulez pas en mettre il suffit de ne rien écrire et de presser \"Entrée\") :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string image = "";
                image = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Veuillez saisir le thumbnail de l'embed (si vous ne voulez pas en mettre il suffit de ne rien écrire et de presser \"Entrée\") :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string thumbnail = "";
                thumbnail = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Veuillez saisir le footer de l'embed (si vous ne voulez pas en mettre il suffit de ne rien écrire et de presser \"Entrée\") :" + Environment.NewLine, System.Drawing.Color.Cyan);
                string footer = "";
                footer = Console.ReadLine();
                Console.WriteLine(Environment.NewLine + "Couleur de l'embed [RGB] :" + Environment.NewLine, System.Drawing.Color.Cyan);
                byte r = byte.Parse(Console.ReadLine());
                Console.WriteLine(Environment.NewLine + "Couleur de l'embed [RGB] :" + Environment.NewLine, System.Drawing.Color.Cyan);
                byte g = byte.Parse(Console.ReadLine());
                Console.WriteLine(Environment.NewLine + "Couleur de l'embed [RGB] :" + Environment.NewLine, System.Drawing.Color.Cyan);
                byte b = byte.Parse(Console.ReadLine());
                Console.WriteLine(Environment.NewLine + "Voulez vous activer le timestamp ? [Oui / Non] (Majuscule à la 1er lettre)" + Environment.NewLine, System.Drawing.Color.Cyan);
                string oi = Console.ReadLine();
                if (oi == "Oui")
                {
                    var builder = new EmbedBuilder()
                                  .WithTitle(titre)
                                  .WithDescription(message)
                                  .WithImageUrl(image)
                                  .WithThumbnailUrl(thumbnail)
                                  .WithColor(new Color(r, g, b))
                                  .WithFooter(footer)
                                  .WithCurrentTimestamp();
                    var embed = builder.Build();
                    await chnl.SendMessageAsync(null, false, embed);
                }
                if (oi == "Non")
                {
                    var builder = new EmbedBuilder()
                                  .WithTitle(titre)
                                  .WithDescription(message)
                                  .WithImageUrl(image)
                                  .WithThumbnailUrl(thumbnail)
                                  .WithColor(new Color(r, g, b))
                                  .WithFooter(footer);
                    var embed = builder.Build();
                    await chnl.SendMessageAsync(null, false, embed);
                }

                Console.WriteLine(Environment.NewLine + "Votre embed a bien été envoyer !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "7")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Bannir un utilisateur";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine(Environment.NewLine + "[Vous (ou votre bot) devez avoir la permission de gerer les bannissements]" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Veuillez saisir l'id du serveur ou ce trouve la personne que vous voulez bannir :" + Environment.NewLine, System.Drawing.Color.Cyan);
                ulong serv = ulong.Parse(Console.ReadLine());
                Console.WriteLine(Environment.NewLine + "Veuillez saisir l'id de la personne que vous voulez bannir :" + Environment.NewLine, System.Drawing.Color.Cyan);
                ulong       iduser = ulong.Parse(Console.ReadLine());
                SocketGuild guild  = _client.GetGuild(serv);

                foreach (SocketUser user in guild.Users)
                {
                    try
                    {
                        await guild.AddBanAsync(iduser, 0, "Discord Kira-Tool");
                    }
                    catch (Exception)
                    {
                        Console.WriteLine(Environment.NewLine + "Une erreur est survenue. Nous allons vous remettre sur la page principale.", System.Drawing.Color.Red);
                        await Task.Delay(4000);

                        return(await Program.ReadyApp());
                    }
                }

                Console.WriteLine(Environment.NewLine + "L'utilisateur a bien été banni !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }

            if (up == "8")
            {
                Console.Clear();
                Console.Title = "Discord Kira-Tool | Débannir un utilisateur";
                Console.WriteAscii("Discord Kira-Tool V.1", System.Drawing.Color.DeepPink);
                Console.WriteLine("By Seryû : https://github.com/Seryu-Ub" + Environment.NewLine, System.Drawing.Color.DeepPink);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine("Connecté sur l'utilisateur : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator, System.Drawing.Color.MediumPurple);
                Console.WriteLine("--------------------------------------", System.Drawing.Color.MediumPurple);
                Console.WriteLine(Environment.NewLine + "[Vous (ou votre bot) devez avoir la permission de gerer les bannissements]" + Environment.NewLine, System.Drawing.Color.MediumPurple);
                Console.WriteLine("Veuillez saisir l'id du serveur ou ce trouve la personne que vous voulez débannir :" + Environment.NewLine, System.Drawing.Color.Cyan);
                ulong serv = ulong.Parse(Console.ReadLine());
                Console.WriteLine(Environment.NewLine + "Veuillez saisir l'id de la personne que vous voulez débannir :" + Environment.NewLine, System.Drawing.Color.Cyan);
                ulong       iduser = ulong.Parse(Console.ReadLine());
                SocketGuild guild  = _client.GetGuild(serv);

                foreach (SocketUser user in guild.Users)
                {
                    try
                    {
                        await guild.RemoveBanAsync(iduser);
                    }
                    catch (Exception)
                    {
                        Console.WriteLine(Environment.NewLine + "Une erreur est survenue. Nous allons vous remettre sur la page principale.", System.Drawing.Color.Red);
                        await Task.Delay(4000);

                        return(await Program.ReadyApp());
                    }
                }

                Console.WriteLine(Environment.NewLine + "L'utilisateur a bien été débanni !" + Environment.NewLine, System.Drawing.Color.MediumPurple);

                await Task.Delay(4000);

                await Program.ReadyApp();
            }
            return(Task.CompletedTask);
        }
 public virtual Task AddBanAsync(IUser user, int pruneDays = 0, string?reason = null, RequestOptions?options = null)
 {
     return(_socketGuild.AddBanAsync(user, pruneDays, reason, options));
 }
Esempio n. 9
0
 public Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null)
 {
     return(Guild.AddBanAsync(user, pruneDays, reason, options));
 }
Esempio n. 10
0
        public async Task ban(string Uid, ulong GuildId, string pass = "")
        {
            bCheck();
            if (check != true)
            {
                return;
            }

            if (Context.Client.Guilds.Where(x => x.Id == GuildId).Count() < 1)
            {
                await Context.User.SendMessageAsync($":x: **I am not in a guild with id: {GuildId}**");

                return;
            }
            SocketGuild Guild = Context.Client.Guilds.Where(x => x.Id == GuildId).FirstOrDefault();

            if (Uid == "all" || Uid == "ALL")
            {
                if (pass != Settings.ProtectPassword)
                {
                    EmbedBuilder eb1 = new EmbedBuilder();
                    eb1.WithAuthor($"Error");
                    eb1.WithColor(40, 200, 150);
                    eb1.WithDescription($":x: **Protect password for mass ban is incorrect**");
                    eb1.WithThumbnailUrl(Settings.MainThumbnailUrl);
                    await Context.User.SendMessageAsync("", false, eb1.Build());

                    return;
                }
                foreach (var user in Guild.Users)
                {
                    if (user.Hierarchy < Guild.CurrentUser.Hierarchy)
                    {
                        await Guild.AddBanAsync(user, 7);
                    }
                }
                EmbedBuilder eb = new EmbedBuilder();
                eb.WithAuthor($"Succesfull");
                eb.WithColor(40, 200, 150);
                eb.WithDescription($":white_check_mark: **All users with lower role was banned in {Guild.Name} succesfully**");
                eb.WithThumbnailUrl(Guild.IconUrl);
                await Context.User.SendMessageAsync("", false, eb.Build());

                string text = $"[{DateTime.UtcNow}] {Context.User.Username} used d!bban ALL command for guild {Guild.Name}.";
                Console.WriteLine(text);
                await bLog(text);

                return;
            }
            try
            {
                await Guild.AddBanAsync(ulong.Parse(Uid));

                EmbedBuilder eb = new EmbedBuilder();
                eb.WithAuthor($"Succesfull");
                eb.WithColor(40, 200, 150);
                eb.WithDescription($":white_check_mark: **Banned user with id {Uid} in {Guild.Name} succesfully**");
                eb.WithThumbnailUrl(Settings.MainThumbnailUrl);
                await Context.User.SendMessageAsync("", false, eb.Build());

                string text = $"[{DateTime.UtcNow}] {Context.User.Username} used d!bban command for user with id {Uid} in {Guild.Name}.";
                Console.WriteLine(text);
                await bLog(text);

                return;
            }
            catch (Exception ex)
            {
                EmbedBuilder eb = new EmbedBuilder();
                eb.WithAuthor($"Error");
                eb.WithColor(40, 200, 150);
                eb.WithDescription($":x: **Can't ban user with id {Uid} in {Guild.Name} {Environment.NewLine} Error: {ex.Message}**");
                eb.WithThumbnailUrl(Settings.MainThumbnailUrl);
                await Context.User.SendMessageAsync("", false, eb.Build());

                return;
            }
        }
Esempio n. 11
0
        // Usage: (command) (mention) (reason)
        public override async Task Invoke(SocketGuild g, SocketMessage msg)
        {
            string[] line = msg.Content.Split(new char[] { ' ' }, 3, StringSplitOptions.RemoveEmptyEntries);
            string   targetstr;
            string   reason;

            if (line.Length < 2)
            {
                await SendUsageMessageAsync(msg.Channel, null);

                return;
            }
            targetstr = line[1];

            if (line.Length == 3)
            {
                // Reason given - keep it
                reason = line[2];
            }
            else
            {
                // No reason given
                if (_forceReason)
                {
                    await SendUsageMessageAsync(msg.Channel, ReasonRequired);

                    return;
                }
                reason = null;
            }

            // Retrieve target user
            var(targetId, targetData) = await GetUserDataFromString(g.Id, targetstr);

            if (targetId == 1)
            {
                await msg.Channel.SendMessageAsync(
                    string.Format(FailPrefix, (_mode == CommandMode.Ban ? "ban" : "kick")) + FailDefault);

                return;
            }
            if (targetId == 0)
            {
                await SendUsageMessageAsync(msg.Channel, TargetNotFound);

                return;
            }

            SocketGuildUser targetobj = g.GetUser(targetId);
            string          targetdisp;

            if (targetData != null)
            {
                targetdisp = $"{targetData.Username}#{targetData.Discriminator}";
            }
            else
            {
                targetdisp = $"ID {targetId}";
            }

            if (_mode == CommandMode.Kick && targetobj == null)
            {
                // Can't kick without obtaining the user object
                await SendUsageMessageAsync(msg.Channel, TargetNotFound);

                return;
            }

            // Checks for existing (found) users:
            if (targetobj != null)
            {
                // Bot check
                if (targetobj.IsBot)
                {
                    await SendUsageMessageAsync(msg.Channel, ":x: I will not do that. Please kick bots manually.");

                    return;
                }
                // Hierarchy check
                if ((msg.Author as SocketGuildUser).Hierarchy <= targetobj.Hierarchy)
                {
                    // Block kick attempts if the invoking user is at or above the target in role hierarchy
                    await SendUsageMessageAsync(msg.Channel, ":x: You are not allowed to kick this user.");

                    return;
                }
            }

            // Send out message
            var notifyTask = SendNotificationMessage(targetobj, reason);

            // Do the action
            try
            {
                string reasonlog = $"Invoked by {msg.Author}.";
                if (reason != null)
                {
                    reasonlog += $" Reason: {reason}";
                }
                await notifyTask;
#if !DEBUG
                if (_mode == CommandMode.Ban)
                {
                    await g.AddBanAsync(targetId, _purgeDays, reasonlog);
                }
                else
                {
                    await targetobj.KickAsync(reasonlog);
                }
#else
#warning "Actual kick/ban action is DISABLED during debug."
#endif
                string resultmsg = BuildSuccessMessage(targetdisp);
                if (notifyTask.Result == false)
                {
                    resultmsg += NotifyFailed;
                }
                await msg.Channel.SendMessageAsync(resultmsg);
            }
            catch (Discord.Net.HttpException ex)
            {
                string err = string.Format(FailPrefix, (_mode == CommandMode.Ban ? "ban" : "kick"));
                if (ex.HttpCode == System.Net.HttpStatusCode.Forbidden)
                {
                    await msg.Channel.SendMessageAsync(err + Fail403);
                }
                else if (ex.HttpCode == System.Net.HttpStatusCode.NotFound)
                {
                    await msg.Channel.SendMessageAsync(err + Fail404);
                }
                else
                {
                    await msg.Channel.SendMessageAsync(err + FailDefault);
                    await Log(ex.ToString());
                }
            }
        }
Esempio n. 12
0
        private async static Task <Task> ReadyAsync()
        {
            Console.Clear();



            Console.Title = $" Discord Raider | {_client.CurrentUser.Username}#{_client.CurrentUser.Discriminator}";

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);

            System.Threading.Thread.Sleep(4700);

            Console.Clear();
            Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option ! (more option, write : EasterEGG and press enter)");

            Console.ForegroundColor = ConsoleColor.DarkCyan;
            Console.WriteLine("___________________________________________________________________________________________________________________");
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("[1] Unban All (1.1)       [4] Create mass text channel   [7] Create mass voice channel    [10] Unban Specific User  ");
            Console.WriteLine("[2] DMALL                 [5] Give admin to all (1.1)    [8] Rename all (1.1)             [11] Twitch settings      ");
            Console.WriteLine("[3] Delete all channel    [6] List server                [9] Ban all                      [12] Game settings        ");
            Console.ForegroundColor = ConsoleColor.DarkCyan;
            Console.WriteLine("____________________________________________________________________________________________________________________");
            Console.ForegroundColor = ConsoleColor.Green;



            string mas = Console.ReadLine();



            if (mas == "EasterEGG")

            {
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("___________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("Write : Credit");
                Console.WriteLine("Write : ByStan");
                Console.WriteLine("Write : ZelliDev");
                Console.WriteLine("Write : Kirua");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("____________________________________________________________________________________________________________________");
                Console.ReadKey();
                await Program.ReadyAsync();
            }

            if (mas == "Avaris")

            {
                await _client.SetGameAsync("A");

                System.Threading.Thread.Sleep(1000);

                await _client.SetGameAsync("Av");

                System.Threading.Thread.Sleep(1000);

                await _client.SetGameAsync("Ava");

                System.Threading.Thread.Sleep(1000);

                await _client.SetGameAsync("Avar");

                System.Threading.Thread.Sleep(1000);

                await _client.SetGameAsync("Avaris");

                System.Threading.Thread.Sleep(1000);
                await Program.ReadyAsync();
            }


            if (mas == "Zellidev")

            {
                Console.WriteLine("A candian programmer...");
                await _client.SetGameAsync("Z");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Ze");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Zel");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Zell");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Zelly");

                System.Threading.Thread.Sleep(900);
                await Program.ReadyAsync();
            }

            if (mas == "Kirua")
            {
                Console.WriteLine("My Friend");
                await _client.SetGameAsync("K");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Ki");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Kir");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Kiru");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Kirua");

                System.Threading.Thread.Sleep(900);
                await Program.ReadyAsync();
            }



            if (mas == "ByStan")
            {
                await _client.SetGameAsync("S");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("St");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Sta");

                System.Threading.Thread.Sleep(900);
                await _client.SetGameAsync("Stan");

                System.Threading.Thread.Sleep(900);


                var fileStream = new FileStream(Directory.GetCurrentDirectory() + "/Stan.png", FileMode.Open);
                var image      = new Image(fileStream);
                await _client.CurrentUser.ModifyAsync(u => u.Avatar = image);



                await Program.ReadyAsync();
            }



            if (mas == "Credit")

            {
                Console.WriteLine("Devloppement : By Stanley#0001");
                Console.WriteLine("Design : By Stanley#0001");
            }



            if (mas == "12")
            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[12] Game settings");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Wath is the game you wanna set? ");
                string name = Console.ReadLine();

                await _client.SetGameAsync(name);

                await Program.ReadyAsync();
            }

            if (mas == "11")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[11] Twitch settings");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Que regardez vous ?");
                string a = Console.ReadLine();

                Console.WriteLine("Le lien twitch ?");
                string b = Console.ReadLine();

                await _client.SetGameAsync(a, b, StreamType.Twitch);

                await Program.ReadyAsync();
            }

            if (mas == "10")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[10] Unban Specific User");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.Write("Guild ID : ");
                string guildid2 = Console.ReadLine();


                ulong id = Convert.ToUInt64(guildid2);

                Console.Write("User ID : ");
                string userID = Console.ReadLine();

                ulong userid = Convert.ToUInt64(userID);

                SocketGuild guild = _client.GetGuild(id);

                foreach (SocketUser user in guild.Users)
                {
                    try
                    {
                        await guild.RemoveBanAsync(userid);
                    }
                    catch (Exception)
                    {
                    }
                }

                await Program.ReadyAsync();
            }

            if (mas == "9")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[9] Ban all");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.WriteLine("Guild ID : ");

                string guildid2 = Console.ReadLine();

                ulong id = Convert.ToUInt64(guildid2);

                SocketGuild guild = _client.GetGuild(id);

                foreach (SocketUser user in guild.Users)
                {
                    try
                    {
                        await guild.AddBanAsync(user, 0, "Using Stanraid");
                    }
                    catch (Exception)
                    {
                    }
                }

                await Program.ReadyAsync();
            }

            if (mas == "8")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[8] ???????");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;


                await Program.ReadyAsync();
            }

            if (mas == "7")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[7] Create mass voice channel");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.Write("Server ID : ");
                string guildid2 = Console.ReadLine();

                Console.Write("Voice Channel Name : ");
                string textchan = Console.ReadLine();

                ulong id = Convert.ToUInt64(guildid2);

                SocketGuild guild = _client.GetGuild(id);

                for (int i = 0; i < 100; i++)
                {
                    try
                    {
                        await guild.CreateVoiceChannelAsync(textchan.Replace(' ', '-'));
                    }
                    catch (Exception)
                    {
                    }
                }

                await Program.ReadyAsync();
            }

            if (mas == "6")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[6] List Server");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                foreach (var guild in _client.Guilds)
                {
                    Console.WriteLine("+ Name : " + guild.Name + " | ID : " + guild.Id + " | Owner : " + guild.Owner);
                }

                Console.ReadKey();
                await Program.ReadyAsync();
            }

            if (mas == "5")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[5] ???????");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;



                await Program.ReadyAsync();
            }

            if (mas == "4")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[4] Create mass text channel");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.Write("Server ID : ");
                string guildid2 = Console.ReadLine();

                Console.Write("Text Channel Name : ");
                string textchan = Console.ReadLine();

                ulong id = Convert.ToUInt64(guildid2);

                SocketGuild guild = _client.GetGuild(id);

                for (int i = 0; i < 100; i++)
                {
                    try
                    {
                        await guild.CreateTextChannelAsync(textchan.Replace(' ', '-'));
                    }

                    catch (Exception)
                    {
                    }
                }


                await Program.ReadyAsync();
            }



            if (mas == "3")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[3] Delete all channel");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.Write("Guild ID : ");

                string guildid2 = Console.ReadLine();

                ulong id = Convert.ToUInt64(guildid2);

                SocketGuild guild = _client.GetGuild(id);

                foreach (SocketTextChannel chan in guild.TextChannels)
                {
                    try
                    {
                        await chan.DeleteAsync();
                    }
                    catch (Exception)
                    {
                    }
                }

                foreach (SocketVoiceChannel chanv in guild.VoiceChannels)
                {
                    try
                    {
                        await chanv.DeleteAsync();
                    }
                    catch (Exception)
                    {
                    }
                }

                await Program.ReadyAsync();
            }

            if (mas == "2")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[2] DMALL");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.Write("DMALL Message : ");

                string DMALL2 = Console.ReadLine();



                foreach (SocketGuild guild in _client.Guilds)
                {
                    foreach (SocketUser user in guild.Users)
                    {
                        try
                        {
                            await user.SendMessageAsync(DMALL2);
                        }
                        catch (Exception)
                        {
                            Console.ForegroundColor = ConsoleColor.Red;
                            Console.WriteLine("Cannot send : 1 : message");
                        }
                    }

                    await Program.ReadyAsync();
                }
            }

            if (mas == "1")

            {
                Console.Clear();
                Console.WriteLine("Login succes : " + _client.CurrentUser.Username + "#" + _client.CurrentUser.Discriminator);
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine("\t\r\n\t       ████████  ██████████  ██████  ██    ██      ████████  ██████  ██  ██████    ██████  ████████\r\n\t    ██              ██      ██  ██  ████  ██      ██    ██  ██  ██      ██   ██   ██      ██    ██\r\n\t     ██████        ██      ██████  ████████      ████████  ██████  ██  ██    ██  ████    ████████\r\n\t          ██      ██      ██  ██  ██  ████      ██  ██    ██  ██  ██  ██   ██   ██      ██  ██\r\n\t ████████        ██      ██  ██  ██    ██  ██  ██    ██  ██  ██  ██  ██████    ██████  ██    ██\r\n\t\t\t\tBy Stanley & Rataka");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Hi " + _client.CurrentUser.Username + " This is the raid option !");

                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("[1] Leave");
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.WriteLine("Leave message : ");
            }


            return(Task.CompletedTask);
        }