示例#1
0
        public async Task Github(string branch = "")
        {
            var    embed  = new Discord.EmbedBuilder();
            string Branch = branch.ToLower();

            //embed.WithTitle("Github");

            if (Branch == "master")
            {
                embed.AddInlineField("Master", "https://github.com/Gagong/Toshinou-Revamped/tree/master");
            }
            else if (Branch == "beta")
            {
                embed.AddInlineField("Beta", "https://github.com/Gagong/Toshinou-Revamped/tree/beta").WithFooter("WARNING: This is not a stable build, recommended to use Master");
            }
            else
            {
                embed.AddInlineField("Master (Recommended)", "https://github.com/Gagong/Toshinou-Revamped/tree/master");
                embed.AddInlineField("Beta", "https://github.com/Gagong/Toshinou-Revamped/tree/beta");
            }

            embed.Color = Color.Green;
            embed.WithAuthor("Smart Toshinou | Github", "", ""); // Name, IconURL, URL(???)
            await ReplyAsync("", false, embed);
        }
示例#2
0
        /// <summary>
        /// Gets the raffle to be displayed in the server chat
        /// </summary>
        /// <param name="price">The cost of one ticket</param>
        /// <param name="amountOfTickets">How many tickets one person can buy</param>
        /// <param name="item">The item that is being raffled</param>
        /// <returns>EmbedBuilder holding the raffle to be displayed</returns>
        private EmbedBuilder GetRaffleToDisplay(int price, int amountOfTickets, string item)
        {
            //Create an embed to show the raffle details
            Discord.EmbedBuilder raffle = new Discord.EmbedBuilder();
            Random ran    = new Random();     //Used to get a random number for the color of the embed
            int    color1 = ran.Next(0, 256);
            int    color2 = ran.Next(0, 256); //Get three random numbers for the color
            int    color3 = ran.Next(0, 256);

            raffle.WithColor(color1, color2, color3); //Add a color to the raffle with RBG values
            raffle.AddField("Prize", item);           //Add the field holding the prize

            //Display that a raffle was made
            if (price == 0) //If there is a price per ticket
            {
                raffle.AddField("Entry Cost", "Free");
            }
            else
            {
                raffle.AddField("Entry Cost", price + " gold");
            }

            if (amountOfTickets > 0) //How many tickets you can purchase
            {
                raffle.AddField("Number Of Tickets Per Person", amountOfTickets);
            }
            else
            {
                raffle.AddField("Number Of Tickets Per Person", "Unlimited");
            }

            return(raffle);
        }
示例#3
0
        public async Task Help()
        {
            var a = new Discord.EmbedBuilder();

            a.AddInlineField("/mchelp", "Gets the list of GameOut Minecraft Server commands.").WithColor(25, 25, 112);

            a.AddInlineField("/adhelp", "Gets the list of bot owner commands.");

            a.AddInlineField("/reee", "For when autism strikes.");

            a.AddInlineField("/insult", "For when you wanna insult someone.");

            a.AddInlineField("/killme", "For when you wanna die.");

            a.AddInlineField("/8ball", "For when autism strikes.");

            a.AddInlineField("/tellajoke", "Tells a joke.");

            a.AddInlineField("/rate + WhatYouWantRatedHere", "Rates the input.");

            a.AddInlineField("/stats", "Receives bot stats.");

            a.AddInlineField("/get time", "Gets the current time.");

            a.AddInlineField("/get date", "Gets the current date.");

            IDMChannel gencom = await Context.Message.Author.GetOrCreateDMChannelAsync();

            await gencom.SendMessageAsync("", false, a);

            await gencom.CloseAsync();
        }
示例#4
0
        void help(ServerMessage e, String m)
        {
            /*            var eb = new EmbedBuilder();
             *          eb = eb.WithAuthor("The Overbork", this.DC.CurrentUser.GetAvatarUrl()).WithCurrentTimestamp().WithTitle("Help");
             *          const int maxFieldSize = 1024;
             *          for(int i = 0; i < ((botInfo.Length + (maxFieldSize-1)) / maxFieldSize); i++)
             *          {
             *              int remLen = botInfo.Length - i * maxFieldSize;
             *              int len = remLen < maxFieldSize ? remLen : maxFieldSize;
             *              eb = eb.AddField("help" + i, botInfo.Substring(i * maxFieldSize, len));
             *          }
             *          safeSendEmbed(e.Channel, eb.Build());*/
            /*            safeSendMessage(e.Channel,
             * "Standing by for orders, " + e.Author.Username + @"!
             *
             * " + botInfo, true);*/
            var     parts = m.Split(" ".ToArray(), StringSplitOptions.RemoveEmptyEntries);
            Command com;

            if (parts.Length > 0 && Commandlist.TryGetValue(parts[0], out com) && shouldDisplayHelp(com, e.Author, e.Channel))
            {
                safeSendEmbed(e.Channel, com.getHelpMessageEmbed());
            }
            else
            {
                var eb = new Discord.EmbedBuilder().WithAuthor("The Overbork", this.DC.CurrentUser.GetAvatarUrl()).WithCurrentTimestamp();
                eb.WithTitle("Available commands").WithDescription("This is a list of all commands currently available to you. For help with a particular command, try !help followed by that command name. ```" + getCommandListForUser(e.Author, e.Channel) + "```");
                safeSendEmbed(e.Channel, eb.Build());
            }
        }
示例#5
0
        public async Task Mastery(string region, string summonerName, string championName)
        {
            RiotData   data       = new RiotData();
            RiotClient riotClient = new RiotClient(OptionManager.RiotKey);

            DataLibrary.Champion champion = null;
            Discord.EmbedBuilder builder  = null;
            var championList = data.Champions.Where(x => x.name.ToLower().Equals(championName.ToLower())).ToList();

            if (championList.Count < 1)
            {
                championList = new RiotData().Champions.Where(x => x.name.ToLower().Contains(championName.ToLower()))
                               .ToList();
            }
            champion = championList[0];
            if (champion != null)
            {
                var summoner        = riotClient.Summoner.GetSummonerByName(summonerName, PlatformHelper.StringToPlatform(region));
                var masteries       = riotClient.Masteries.GetchampionMasteries(PlatformHelper.StringToPlatform(region), summoner.SummonerId);
                var championMastery = masteries.FirstOrDefault(x => x.ChampionId == champion.ChampionId);
                builder = Builders.BaseBuilder($"{summoner.Name} mastery for {champion.name}", "", Color.DarkBlue, null, $"http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/{champion.key}.png");
                builder.AddInlineField("Level", championMastery.Level);
                builder.AddInlineField("Points", championMastery.ChampionPoints);
            }
            else
            {
                builder = Builders.ErrorBuilder("Champion was not found");
            }

            await ReplyAsync("", embed : builder.Build());
        }
示例#6
0
        public async Task help(string isLocal = null)
        {
            var privateEmbed = new Discord.EmbedBuilder();
            var publicEmbed  = new Discord.EmbedBuilder();

            privateEmbed.WithTitle("Lista komend:")
            .AddInlineField("!komeny", "!orbit \n!orbit2 \n!orbit3 \n!orbitmax\n!Wojownicy \n!szogun \n!pikna \n!notak \n!mioush \n!jordan_cry \n!heh \n!Gontta \n!damnwhat \n!by_the_pope \n!biiiicz \n!ALKUS")
            .AddField("usefullShiet", "!help // wysyla sms o tresci pomagam \n (-p jesli chcesz na publiczny kanal help) \n !del x //usówa x ostatnich wiadomości ");
            publicEmbed.WithTitle("Lista komend:")
            .AddInlineField("!komendy", "!orbit \n!orbit2 \n!orbit3 \n!orbitmax\n!Wojownicy \n!szogun \n!pikna \n!notak \n!mioush \n!jordan_cry \n!heh \n!Gontta \n!damnwhat \n!by_the_pope \n!biiiicz \n!ALKUS")
            .AddInlineField("Emotki", "\n\n\n :Wojownicy: \n :szogun: \n :pikna: \n <:notak:403267331264086016> \n <:mioush:425310386292523008> \n :jordan_cry: \n <:heh:333585033204072458> \n <:Gontta:417747336287223828> \n <:damnwhat:413093188178411520> \n <:by_the_pope:493411746002894864> \n :biiiicz: \n <:ALKUS:334775515263270912>")
            .AddField("usefullShiet", "!help // wysyla sms o tresci pomagam \n (-p jesli chcesz na publiczny kanal help) \n !del x //usówa x ostatnich wiadomości ");
            if (isLocal != "-p")
            {
                Discord.IDMChannel gencom = await Context.Message.Author.GetOrCreateDMChannelAsync();

                await gencom.SendMessageAsync("", false, privateEmbed);

                await gencom.CloseAsync();
            }
            else
            {
                for (int helpChannelID = 0; helpChannelID < Context.Guild.TextChannels.Count; helpChannelID++)
                {
                    var helpChannel = Context.Guild.TextChannels.ElementAt(helpChannelID);
                    if (helpChannel.Name == "help")
                    {
                        await helpChannel.SendMessageAsync("", false, publicEmbed);
                    }
                }
            }
        }
示例#7
0
        public async Task Search([Remainder] string name)
        {
            var root = RequestHandler.GetAmiibo(name);

            foreach (var amiibo in root.amiibo)
            {
                Discord.EmbedBuilder builder = Builders.BaseBuilder("", "", Color.DarkMagenta,
                                                                    new EmbedAuthorBuilder().WithName("AmiiboAPI's Results").WithUrl("http://www.amiiboapi.com"), null);
                builder.AddInlineField("General Information",
                                       "**Name: **" + amiibo.Name + "\n" +
                                       "**Amiibo Series: **" + amiibo.Series + "\n" +
                                       "**Game Series: **" + amiibo.GameSeries);
                builder.AddInlineField("Releases",
                                       "**NA:** " + Convert.ToDateTime(amiibo.Releases.na).ToLongDateString() + "\n" +
                                       "**EU: **" + Convert.ToDateTime(amiibo.Releases.eu).ToLongDateString() + "\n" +
                                       "**JP: **" + Convert.ToDateTime(amiibo.Releases.jp).ToLongDateString() + "\n" +
                                       "**AU: **" + Convert.ToDateTime(amiibo.Releases.au).ToLongDateString());
                try
                {
                    builder.WithImageUrl(amiibo.ImageURL);
                }
                catch { }
                await ReplyAsync("", embed : builder.Build());
            }
        }
示例#8
0
        private async Task SendQuote(int number, string quote, IMessageChannel channel)
        {
            var msg = new Discord.EmbedBuilder();

            msg.Title = ":hash: Quote " + number;

            var res = "";

            foreach (var line in ParseQuote(quote))
            {
                if (line.Item1 != null)
                {
                    if (line.Item1.StartsWith("!"))
                    {
                        res += $"***{line.Item1.Substring(1).TrimStart()}** { line.Item2.TrimEnd() }*\r\n";
                    }
                    else
                    {
                        res += $"<**{line.Item1.Trim()}**> { line.Item2 } \r\n";
                    }
                }
                else
                {
                    res += $"{ line.Item2 }\r\n";
                }
            }

            msg.Description = res;
            msg.Color       = Color.Red;

            await channel.SendMessageAsync("", embed : msg.Build());
        }
示例#9
0
文件: Test.cs 项目: Fasuh/bot
        public async Task info(SocketUser user = null)
        {
            if (user == null)
            {
                user = Context.Message.Author;
            }
            dbase.chkserver(Context.Guild);
            string       query = "SELECT * FROM uzytkownicy as u INNER JOIN `servery` as s ON u.Server = s.id WHERE u.user='******' AND s.nid='" + Context.Guild.Id.ToString() + "'";
            MySqlCommand cmd   = new MySqlCommand(query, dbase.connect);

            if (!dbase.HasRows(cmd))
            {
                query = "INSERT INTO `uzytkownicy`(`id`, `user`, `score`, `ranks`, `level`, `link`, `server`) VALUES (null,'" + user.Id.ToString() + "',0 ,null ,1 ,null,  '" + dbase.Chkserver(Context.Guild.Id.ToString()) + "')";
                cmd   = new MySqlCommand(query, dbase.connect);
                dbase.make(cmd);
                query = "SELECT * FROM `uzytkownicy` as u INNER JOIN `servery` as s ON u.Server = s.id WHERE u.user='******' AND s.nid='" + Context.Guild.Id.ToString() + "'";
                cmd   = new MySqlCommand(query, dbase.connect);
            }
            DataTable info    = dbase.Read(cmd);
            var       builder = new Discord.EmbedBuilder();

            builder.WithTitle("Informacje o uzytkowniku " + user.Username);
            builder.WithThumbnailUrl(user.GetAvatarUrl());
            builder.AddField("Ilość punktów:", info.Rows[0][2]);
            builder.AddInlineField("Poziom:", info.Rows[0][4]);
            if (info.Rows[0][5] != null && info.Rows[0][5].ToString() != "")
            {
                builder.AddInlineField("Deviantart:", info.Rows[0][5].ToString());
            }
            builder.WithColor(Color.DarkGreen);
            await Context.Channel.SendMessageAsync("", false, builder);
        }
示例#10
0
文件: Test.cs 项目: Fasuh/bot
        public async Task rate(string link = null)
        {
            DateTime czas = time.AddSeconds(10);

            if (link == null)
            {
                link = Context.Message.Attachments.FirstOrDefault().Url;
            }
            var builder = new Discord.EmbedBuilder();

            builder.WithTitle("Ocena");
            builder.AddInlineField("Autor: " + Context.Message.Author.Username, "Obrazek:");
            builder.WithImageUrl(link);
            builder.WithColor(Color.DarkGreen);
            dbase.chkserver(Context.Guild);
            string       query = "SELECT * FROM `servery` WHERE `nid`='" + Context.Guild.Id.ToString() + "'";
            MySqlCommand cmd   = new MySqlCommand(query, dbase.connect);
            var          msg   = await((ISocketMessageChannel)Context.Guild.GetChannel(ulong.Parse(dbase.Read(cmd).Rows[0][3].ToString()))).SendMessageAsync("", false, builder);
            await msg.AddReactionAsync(Context.Guild.Emotes.First(e => e.Name == "redbean"));

            string format = "yyyy-MM-dd HH:mm:ss";

            query = "INSERT INTO `timery` (`id`, `user`, `type`, `time`, `text`, `Server`) VALUES (NULL, '" + Context.Message.Author.Id + "', 'rate', '" + czas.ToString(format) + "', '" + msg.Id + "', '" + dbase.Chkserver(Context.Guild.Id.ToString()) + "')";
            cmd   = new MySqlCommand(query, dbase.connect);
            dbase.timer(cmd, "rate", czas, (IGuildUser)Context.Message.Author, Context.Guild.Id.ToString(), msg.Id.ToString());
            Console.WriteLine(time + "\tRozpoczeto glosowanie obrazka uzytkownika " + Context.Message.Author.Username + ".");
        }
示例#11
0
        public void SendLogStart(string starter)
        {
            if (Message != null)
            {
                return;
            }
            var embed = new Discord.EmbedBuilder();

            if (Program.BOT_DEBUG)
            {
                embed.Title = "Debug Game Started";
                embed.Color = Discord.Color.Red;
            }
            else
            {
                embed.Title = "Online Game Started";
            }
            embed.WithUrl(MLAPI.Handler.LocalAPIUrl + "/chess/online");
            embed.WithDescription($"{starter} has started an cross-network game of chess.\n" +
                                  $"Click the link title above to view.\n" +
                                  $"To play or spectate, you will need to [review the Terms]({MLAPI.Handler.LocalAPIUrl}/chess/terms#online), " +
                                  $"then [download the client](https://github.com/CheAle14/bot-chess/releases/latest/download/ChessInstaller.exe)");
            var msg = ChessS.DiscussionChannel.SendMessageAsync("[...]", embed: embed.Build()).Result;

            Message = msg;
            updateBoard();
        }
示例#12
0
        public async Task GetItem([Remainder] string name)
        {
            var message = await ReplyAsync("Getting data...");

            var database = new RiotData();
            //var item = database.Items.FirstOrDefault(x => x.name.ToLower().Equals(name.ToLower()));
            var     itemList = database.Items.Where(x => x.name.ToLower().Equals(name.ToLower())).Include(i => i.gold).ToList();
            ItemDto item     = null;

            Discord.EmbedBuilder builder = null;
            if (itemList.Count > 1)
            {
                var items = database.Items.Where(x => x.name.ToLower().Contains(name.ToLower())).ToList();
                builder = Builders.BaseBuilder("Multiple items found", "", Color.Red, null, "");
                string itemsstring = "";
                items.ForEach(x => itemsstring += x.name + "\n");
                builder.AddField("Items", itemsstring);
                await ReplyAsync("", embed : builder.Build());
            }
            else
            {
                var items = database.Items.Include(x => x.gold).Where(x => x.name.ToLower().Contains(name.ToLower())).ToList();
                if (items.Count == 1)
                {
                    item    = items[0];
                    builder = Builders.BaseBuilder("", "", Color.DarkBlue,
                                                   new EmbedAuthorBuilder().WithName(item.name),
                                                   $"http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/{item.ItemId}.png");
                    builder.AddField("Effect", item.plaintext);
                    builder.AddField("Tooltip",
                                     Regex.Replace(item.description.Replace("<br>", "\n"), "<.*?>", String.Empty));
                    builder.AddField("Cost", $"**Total: **{item.gold.total}\n" +
                                     $"**Base: **{item.gold.Base}");
                    if (!string.IsNullOrEmpty(item.requiredChampion))
                    {
                        builder.AddField("Required Champion", item.requiredChampion);
                    }
                    if (item.consumed)
                    {
                        builder.AddField("Consumable",
                                         $"This item is a consumable and a play can have {item.stacks} of this item at a time.");
                    }
                    await ReplyAsync("", embed : builder.Build());
                }
                else if (items.Count > 1)
                {
                    builder = Builders.BaseBuilder("Multiple items found", "", Color.Red, null, "");
                    string itemsstring = "";
                    items.ForEach(x => itemsstring += x.name + "\n");
                    builder.AddField("Items", itemsstring);
                    await ReplyAsync("", embed : builder.Build());
                }
                else
                {
                    builder = Builders.ErrorBuilder("Item not found");
                    await ReplyAsync("", embed : builder.Build());
                }
            }
            await message.DeleteAsync();
        }
示例#13
0
    public async Task chanwoo()
    {
        var b = new Discord.EmbedBuilder();

        b.WithTitle("븅신쉑");
        b.WithColor(new Discord.Color(0, 170, 255));
        await Context.Channel.SendMessageAsync("", false, b);
    }
示例#14
0
    public async Task welcome()
    {
        var b = new Discord.EmbedBuilder();

        b.WithTitle("Welcome");
        b.WithDescription("Enjoy your time here! :smile:");
        b.WithColor(new Discord.Color(0, 170, 255));
        await Context.Channel.SendMessageAsync("", false, b);
    }
示例#15
0
        public async Task KillMe()
        {
            var b = new Discord.EmbedBuilder();

            b.WithDescription("heheheheheh.............:sob:");
            b.WithColor(new Discord.Color(0, 170, 255));

            await Context.Channel.SendMessageAsync("", false, b);
        }
示例#16
0
        public async Task Reee()
        {
            var b = new Discord.EmbedBuilder();

            b.WithDescription("REEEEEEEEEEEEEEEEEEEEEEEEEEEEE! :kissing_closed_eyes: ");
            b.WithColor(new Discord.Color(0, 170, 255));

            await Context.Channel.SendMessageAsync("", false, b);
        }
示例#17
0
        private async Task Bot_GuildAdded(SocketGuild arg)
        {
            var cfg = await this.GuildRepo.GetConfig(arg);

            await Log.ConsoleOUT($"New Guild: {arg.Name}");


            //Log a message to the logging server.
            try
            {
                //Build embed.
                EmbedBuilder eb = new EmbedBuilder()
                                  .WithTitle("Guild Created")
                                  .WithColor(Color.Green)
                                  .AddField("Guild", arg.Name)
                                  .AddField("Members", arg.Users.Count);

                await Log.sendToChannel(LogChannel.GuildActivity, eb.Build());
            }
            catch (Exception ex)
            {
                await Log.Error(arg, ex);
            }

            //Send a welcome message to the guild.
            try
            {
                var CH = await ChannelHelper.FindChannel_For_Welcome_Message(arg);

                if (CH != null)
                {
                    //Publish a Welcome Message.

                    var eb = new Discord.EmbedBuilder()
                             .WithTitle("WarBOT")
                             .WithColor(Color.Green)
                             .WithDescription("Thanks for inviting me to your server. I will send you notifications related to Hustle Castle war events.")
                             .AddField("_ _", "_ _")
                             .AddField("For Help", $"Just type 'bot, help' or {arg.CurrentUser.Mention} help")
                             .AddField("For Support", "Either click this message or contact <@381654208073433091>.")
                             .AddField("**Setup**", "Have a server admin type: **bot, setup**")
                             .WithUrl("https://github.com/XtremeOwnage/WarBot")
                             .WithImageUrl("http://i1223.photobucket.com/albums/dd516/ericmck2000/download.jpg");

                    await CH.SendMessageAsync(embed : eb.Build());
                }
                else
                {
                    await Log.Error(arg, new Exception("Unable to send my welcome message. No permissions."));
                }
            }
            catch (Exception ex)
            {
                await Log.Error(arg, ex);
            }
        }
示例#18
0
        public async Task Kick(Discord.IGuildUser user, [Remainder] string reason)
        {
            var b = new Discord.EmbedBuilder();

            b.WithTitle("User Kicked").WithDescription(user.Username + " was kicked because " + reason).WithColor(25, 25, 112);

            await Context.Channel.SendMessageAsync("", false, b);

            await user.KickAsync();
        }
示例#19
0
        public async Task RevIp()
        {
            var b = new Discord.EmbedBuilder();

            b.WithTitle("Here's the ip for the FTB Revelations server!");
            b.WithDescription("rev.gameoutnetwork.com");
            b.WithColor(new Discord.Color(0, 170, 255));

            await Context.Channel.SendMessageAsync("", false, b);
        }
示例#20
0
    public async Task rules()
    {
        var b = new Discord.EmbedBuilder();

        b.WithTitle("Rules");
        b.WithDescription("-WOAH");

        b.WithColor(new Discord.Color(0, 170, 255));
        await Context.Channel.SendMessageAsync("", false, b);
    }
示例#21
0
    public async Task Lord()
    {
        var b = new Discord.EmbedBuilder();

        b.WithTitle("AND LOADED!");
        b.WithColor(new Discord.Color(0, 170, 255));
        await Context.Channel.SendMessageAsync("", false, b);

        await Context.Channel.SendMessageAsync("https://ubistatic19-a.akamaihd.net/resource/en-us/game/rainbow6/siege/r6-operator-tachanka_229936.png", false);
    }
示例#22
0
        public async Task Help()
        {
            var a = new Discord.EmbedBuilder();

            a.WithTitle("Commands");
            a.WithDescription("General Commands\n-- .help // Gives list of commands to use");
            Discord.IDMChannel gencom = await Context.Message.Author.GetOrCreateDMChannelAsync();

            await gencom.CloseAsync();
        }
示例#23
0
文件: Test.cs 项目: Fasuh/bot
        public async Task Wadme()
        {
            IGuildUser user = (IGuildUser)Context.Message.Author;

            if (user.GuildPermissions.Administrator)
            {
                var builder = new Discord.EmbedBuilder();
                builder.WithImageUrl("https://cdn.discordapp.com/attachments/349728648443592714/489137824008765462/akumucatshake.gif");
                await Context.Channel.SendMessageAsync("", false, builder);
            }
        }
示例#24
0
        public async Task Vote()
        {
            var b = new Discord.EmbedBuilder();

            b.WithTitle("Don't Forget To Vote For Amazing Rewards At The Following Websites!");
            b.WithDescription("Vote Link 1 : \n https://ftbservers.com/server/dzZfMJNd/vote \n" +
                              "Vote Link 2 : \n https://www.planetminecraft.com/server/game-out-network/vote/ \n" +
                              "Vote Link 3 : \n http://minecraft-mp.com/server/191690/vote/");
            b.WithColor(new Discord.Color(0, 170, 255));

            await Context.Channel.SendMessageAsync("", false, b);
        }
示例#25
0
        public async Task Games()
        {
            var games = RequestHandler.GetGames();

            Discord.EmbedBuilder builder = Builders.BaseBuilder("", "", ColorPicker.SmashModule,
                                                                null, "");
            string message = "";

            games.ForEach(x => message += x.Name + "\n");
            builder.AddField(new EmbedFieldBuilder().WithValue(message).WithName("All games playable on " + Names.SmashLadder));
            await ReplyAsync("", embed : builder.Build());
        }
示例#26
0
文件: Test.cs 项目: Fasuh/bot
        public async Task help()
        {
            var builder = new Discord.EmbedBuilder();

            builder.WithTitle("Komendy");
            builder.AddInlineField("Memy", "`.dmem <nazwa> <link>` - Dodaje mema na serwer,\n\u200b`.dmemnsfw <nazwa> <link>` - Dodaje mema na serwer **tylko nsfw**,\n\u200b`.umem <nazwa>` - Usuwa mem z serwera,\n\u200b`.memelist` - Pokazuje listę memów");
            builder.AddInlineField("Warny", "`.warn <osoba> <powód>` - Daje warna osobie,\n\u200b`.delwarn <osoba> <numer warna>` - Usuwa wybrany warn,\n\u200b`.clearwarns <osoba>` - Czysci wszystkie warny osoby,\n\u200b`.listwarns <[opcjonalnie]osoba>` - pokazuje twoje/czyjes warny.");
            builder.AddInlineField("Rangi", "`.drank <nazwa>` - range o podanej nazwie.,\n\u200b`.urank <nazwa>` - usuwa range podanej nazwie,\n\u200b`.ranga <nazwa>` - nadaje range o podanej nazwie,\n\u200b`.rangi` - pokazuje spis rang dostępnych na serwerze");
            builder.AddInlineField("Fun", "`.patyk <osoba>` - narzędzie wzajemnej motywacji,\n\u200b`.rate <link/zlacznik>` - postuje obrazek na wyznaczonym kanale do oceny przez innych uzytkownikow,\n\u200b`.info <[opcjonalnie]osoba>` - podaje informacje z twojego profilu\n\u200b`.da <link>` - zapisuje link do twojego Deviantartu\n\u200b`.pokazda <[opcjonalnie]osoba>` - podaje link do twojego lub czyjegoś Deviantartu.");
            builder.AddInlineField("Powitania", "`.welmsg <wiadomosc>` - wiadomosc powitalna,\n\u200b`.welchan <kanal>` - kanal na którym wysyłana będzie wiadomość.");
            builder.WithColor(Color.DarkGreen);
            await Context.Channel.SendMessageAsync("", false, builder);
        }
示例#27
0
        public async Task Rate([Remainder] string rquestion)
        {
            Random rnd = new Random();

            int rating = rnd.Next(1, 11);

            var b = new Discord.EmbedBuilder();

            b.WithDescription("I give " + rquestion + " a " + rating + " out of 10");
            b.WithColor(new Discord.Color(0, 170, 255));

            await Context.Channel.SendMessageAsync("", false, b);
        }
示例#28
0
    public async Task KickAsync(Discord.IGuildUser user, [Remainder] string reason)
    {
        if (user.GuildPermissions.KickMembers)
        {
            var b = new Discord.EmbedBuilder();
            b.WithTitle("User Kicked");
            b.WithDescription(user.Username + "was kicked.");
            b.WithColor(new Discord.Color(0, 170, 255));
            await Context.Channel.SendMessageAsync("", false, b);

            await user.KickAsync();
        }
    }
示例#29
0
        public async Task help()
        {
            var a = new Discord.EmbedBuilder();

            a.WithTitle("Commands");
            a.WithDescription("``<<help`` - Gives list of commands to use" +
                              "\n``<<invite`` - Sends you bot invite link in DMs" +
                              "\n``<<search [your request]`` - Information about artist/album/track" +
                              "\n``<<listen [minutes]`` - Listens to your Spotify activity and gives statistics" +
                              "\n``<<listen [minutes] [@mention]`` - Listens to custom user's Spotify activity");
            a.WithColor(Color.Magenta);
            await Context.Channel.SendMessageAsync("", false, a.Build());
        }
示例#30
0
    public async Task help()
    {
        var a = new Discord.EmbedBuilder();

        a.WithTitle("Commands");
        a.WithDescription("General Commands\n!help // Gives list of commands to use");
        a.WithColor(new Discord.Color(0, 170, 255));
        Discord.IDMChannel gencom = await Context.Message.Author.GetOrCreateDMChannelAsync();

        await gencom.SendMessageAsync("", false, a);

        await gencom.CloseAsync();
    }