From 3015de5a562c661c6422ac2b77d277a0514c77a2 Mon Sep 17 00:00:00 2001 From: Poag Date: Tue, 13 Dec 2016 13:23:17 +0000 Subject: [PATCH 1/9] Fixed docker start command Had docker run instead of docker start. --- docs/guides/Docker Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/Docker Guide.md b/docs/guides/Docker Guide.md index ff369e4e..9908a477 100644 --- a/docs/guides/Docker Guide.md +++ b/docs/guides/Docker Guide.md @@ -17,7 +17,7 @@ http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/ Next start the docker up with -```docker run nadeko; docker logs -f nadeko``` +```docker start nadeko; docker logs -f nadeko``` The docker will start and the log file will start scrolling past. Depending on hardware the bot start can take up to 5 minutes on a small DigitalOcean droplet. Once the log ends with "NadekoBot | Starting NadekoBot v1.0-rc2" the bot is ready and can be invited to your server. Ctrl+C at this point to stop viewing the logs. From 9e10230c073ce64a279f63513882c79240bb8a29 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 13 Dec 2016 16:17:40 +0100 Subject: [PATCH 2/9] random range --- .../Modules/CustomReactions/Extensions.cs | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions.cs b/src/NadekoBot/Modules/CustomReactions/Extensions.cs index f5cb66cc..a8a46a90 100644 --- a/src/NadekoBot/Modules/CustomReactions/Extensions.cs +++ b/src/NadekoBot/Modules/CustomReactions/Extensions.cs @@ -3,6 +3,7 @@ using NadekoBot.Services; using NadekoBot.Services.Database.Models; using System; using System.Collections.Generic; +using System.Text.RegularExpressions; namespace NadekoBot.Modules.CustomReactions { @@ -17,7 +18,32 @@ namespace NadekoBot.Modules.CustomReactions { {"%mention%", (ctx) => { return $"<@{NadekoBot.Client.GetCurrentUser().Id}>"; } }, {"%user%", (ctx) => { return ctx.Author.Mention; } }, - {"%rng%", (ctx) => { return new NadekoRandom().Next(0,10).ToString(); } } + //{"%rng%", (ctx) => { return new NadekoRandom().Next(0,10).ToString(); } } + }; + + private static readonly Regex rngRegex = new Regex("%rng(?:(?(?:-)?\\d+)-(?(?:-)?\\d+))?%", RegexOptions.Compiled); + + private static readonly NadekoRandom rng = new NadekoRandom(); + + public static Dictionary regexPlaceholders = new Dictionary() + { + { rngRegex, (match) => { + int from = 0; + int.TryParse(match.Groups["from"].ToString(), out from); + + int to = 0; + int.TryParse(match.Groups["to"].ToString(), out to); + + if(from == 0 && to == 0) + { + return rng.Next(0, 11).ToString(); + } + + if(from >= to) + return ""; + + return rng.Next(from,to+1).ToString(); + } } }; private static string ResolveTriggerString(this string str, IUserMessage ctx) @@ -40,6 +66,11 @@ namespace NadekoBot.Modules.CustomReactions { str = str.Replace(ph.Key.ToLowerInvariant(), ph.Value(ctx, resolvedTrigger)); } + + foreach (var ph in regexPlaceholders) + { + str = ph.Key.Replace(str, ph.Value); + } return str; } From 69791d212c84f36f20a5293ab086571811b9d337 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 13 Dec 2016 16:18:06 +0100 Subject: [PATCH 3/9] Random range docs --- docs/Custom Reactions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md index 803485d3..51995e26 100644 --- a/docs/Custom Reactions.md +++ b/docs/Custom Reactions.md @@ -42,7 +42,7 @@ There are currently three different placeholders which we will look at, with mor |:-----------:|-------------|---------------|-------| |`%mention`|The `%mention%` placeholder is triggered when you type `@BotName` - It's important to note that if you've given the bot a custom nickname, this trigger won't work!|```.acr "Hello %mention%" I, %mention%, also say hello!```|Input: "Hello @BotName" Output: "I, @BotName, also say hello!"| |`%user%`|The `%user%` placeholder mentions the person who said the command|`.acr "Who am I?" You are %user%!`|Input: "Who am I?" Output: "You are @Username!"| -|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10|`.acr "Random number" %rng%`|Input: "Random number" Output: "2"| +|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10. You can also specify a custom range (%rng1-100%) even with negative numbers: `%rng-9--1%` (from -9 to -1) . |`.acr "Random number" %rng%`|Input: "Random number" Output: "2"| |`%target%`|The `%target%` placeholder is used to make Nadeko Mention another person or phrase, it is only supported as part of the response|`.acr "Say this: " %target%`|Input: "Say this: I, @BotName, am a parrot!". Output: "I, @BotName, am a parrot!".| Thanks to Nekai for being creative. <3 From 131f67f6dd8b47758cac479a54692156cbcc0b22 Mon Sep 17 00:00:00 2001 From: Thomas Ruiz Date: Tue, 13 Dec 2016 16:45:32 +0100 Subject: [PATCH 4/9] Update documentation version in the readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bb6a7dff..c0df0727 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ ![img](https://ci.appveyor.com/api/projects/status/gmu6b3ltc80hr3k9?svg=true) [![Discord](https://discordapp.com/api/guilds/117523346618318850/widget.png)](https://discord.gg/0ehQwTK2RBjAxzEY) -[![Documentation Status](https://readthedocs.org/projects/nadekobot/badge/?version=latest)](http://nadekobot.readthedocs.io/en/1.0/?badge=latest) +[![Documentation Status](https://readthedocs.org/projects/nadekobot/badge/?version=latest)](http://nadekobot.readthedocs.io/en/latest/?badge=latest) # NadekoBot [![nadeko1](https://cdn.discordapp.com/attachments/155726317222887425/252095170676391936/A1.jpg)](https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303) -[![nadeko2](https://cdn.discordapp.com/attachments/155726317222887425/252095207514832896/A2.jpg)](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/) +[![nadeko2](https://cdn.discordapp.com/attachments/155726317222887425/252095207514832896/A2.jpg)](http://nadekobot.readthedocs.io/en/latest/Commands%20List/) ##For Update, Help and Guidlines `Follow me on twitter for updates. | Join my Discord server if you need help. | Read the Docs for hosting guides.` -[![twitter](https://cdn.discordapp.com/attachments/155726317222887425/252192520094613504/twiter_banner.JPG)](https://twitter.com/TheNadekoBot) [![discord](https://cdn.discordapp.com/attachments/155726317222887425/252192415673221122/discord_banner.JPG)](https://discord.gg/0ehQwTK2RBjAxzEY) [![Wiki](https://cdn.discordapp.com/attachments/155726317222887425/252192472849973250/read_the_docs_banner.JPG)](http://nadekobot.readthedocs.io/en/1.0/) +[![twitter](https://cdn.discordapp.com/attachments/155726317222887425/252192520094613504/twiter_banner.JPG)](https://twitter.com/TheNadekoBot) [![discord](https://cdn.discordapp.com/attachments/155726317222887425/252192415673221122/discord_banner.JPG)](https://discord.gg/0ehQwTK2RBjAxzEY) [![Wiki](https://cdn.discordapp.com/attachments/155726317222887425/252192472849973250/read_the_docs_banner.JPG)](http://nadekobot.readthedocs.io/en/latest/) From 477071640feecc8e1cb07adfbe6ea9313a7f66ae Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 13 Dec 2016 23:10:45 +0100 Subject: [PATCH 5/9] Fixed permission bug --- .../Database/Repositories/Impl/GuildConfigRepository.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs index 957f40a2..02c287f3 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs @@ -122,9 +122,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl public GuildConfig SetNewRootPermission(ulong guildId, Permission p) { - var data = _set - .Include(gc => gc.RootPermission) - .FirstOrDefault(gc => gc.GuildId == guildId); + var data = PermissionsFor(guildId); data.RootPermission.Prepend(p); data.RootPermission = p; From 405e7fb08079e3db4e3f601eb489c6f882ff92f0 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 14 Dec 2016 01:42:47 +0100 Subject: [PATCH 6/9] fixed .byemsg help --- src/NadekoBot/Resources/CommandStrings.Designer.cs | 2 +- src/NadekoBot/Resources/CommandStrings.resx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index 26273f63..bafae2e9 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -906,7 +906,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Sets a new leave announcement message. Type %user% if you want to mention the new member. Using it with no message will show the current bye message.. + /// Looks up a localized string similar to Sets a new leave announcement message. Type %user% if you want to show the name the user who left. Type %id% to show id. Using this command with no message will show the current bye message.. /// public static string byemsg_desc { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 0a3ae214..82c89eb6 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -202,7 +202,7 @@ byemsg - Sets a new leave announcement message. Type %user% if you want to mention the new member. Using it with no message will show the current bye message. + Sets a new leave announcement message. Type %user% if you want to show the name the user who left. Type %id% to show id. Using this command with no message will show the current bye message. `{0}byemsg %user% has left.` From 71fa7d7ac7fec587cf4903e03d01eaaf3e8fd8aa Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 14 Dec 2016 02:46:57 +0100 Subject: [PATCH 7/9] Docs update --- docs/Commands List.md | 18 +++++++++--------- .../Resources/CommandStrings.Designer.cs | 2 +- src/NadekoBot/Resources/CommandStrings.resx | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/Commands List.md b/docs/Commands List.md index 593c326f..43ed3928 100644 --- a/docs/Commands List.md +++ b/docs/Commands List.md @@ -29,13 +29,6 @@ Command and aliases | Description | Usage `.ban` `.b` | Bans a user by ID or name with an optional message. **Requires BanMembers server permission.** | `.b "@some Guy" Your behaviour is toxic.` `.softban` `.sb` | Bans and then unbans a user by ID or name with an optional message. **Requires KickMembers server permission.** **Requires ManageMessages server permission.** | `.sb "@some Guy" Your behaviour is toxic.` `.kick` `.k` | Kicks a mentioned user. **Requires KickMembers server permission.** | `.k "@some Guy" Your behaviour is toxic.` -`.setmuterole` | Sets a name of the role which will be assigned to people who should be muted. Default is nadeko-mute. **Requires ManageRoles server permission.** | `.setmuterole Silenced` -`.mute` | Mutes a mentioned user both from speaking and chatting. **Requires ManageRoles server permission.** **Requires MuteMembers server permission.** | `.mute @Someone` -`.unmute` | Unmutes a mentioned user previously muted with `.mute` command. **Requires ManageRoles server permission.** **Requires MuteMembers server permission.** | `.unmute @Someone` -`.chatmute` | Prevents a mentioned user from chatting in text channels. **Requires ManageRoles server permission.** | `.chatmute @Someone` -`.chatunmute` | Removes a mute role previously set on a mentioned user with `.chatmute` which prevented him from chatting in text channels. **Requires ManageRoles server permission.** | `.chatunmute @Someone` -`.voicemute` | Prevents a mentioned user from speaking in voice channels. **Requires MuteMembers server permission.** | `.voicemute @Someone` -`.voiceunmute` | Gives a previously voice-muted user a permission to speak. **Requires MuteMembers server permission.** | `.voiceunmute @Someguy` `.deafen` `.deaf` | Deafens mentioned user or users. **Requires DeafenMembers server permission.** | `.deaf "@Someguy"` or `.deaf "@Someguy" "@Someguy"` `.undeafen` `.undef` | Undeafens mentioned user or users. **Requires DeafenMembers server permission.** | `.undef "@Someguy"` or `.undef "@Someguy" "@Someguy"` `.delvoichanl` `.dvch` | Deletes a voice channel with a given name. **Requires ManageChannels server permission.** | `.dvch VoiceChannelName` @@ -71,6 +64,13 @@ Command and aliases | Description | Usage `.repeatinvoke` `.repinv` | Immediately shows the repeat message and restarts the timer. **Requires ManageMessages server permission.** | `.repinv` `.repeat` | Repeat a message every X minutes. If no parameters are specified, repeat is disabled. **Requires ManageMessages server permission.** | `.repeat 5 Hello there` `.migratedata` | Migrate data from old bot configuration **Bot Owner only.** | `.migratedata` +`.setmuterole` | Sets a name of the role which will be assigned to people who should be muted. Default is nadeko-mute. **Requires ManageRoles server permission.** | `.setmuterole Silenced` +`.mute` | Mutes a mentioned user both from speaking and chatting. **Requires ManageRoles server permission.** **Requires MuteMembers server permission.** | `.mute @Someone` +`.unmute` | Unmutes a mentioned user previously muted with `.mute` command. **Requires ManageRoles server permission.** **Requires MuteMembers server permission.** | `.unmute @Someone` +`.chatmute` | Prevents a mentioned user from chatting in text channels. **Requires ManageRoles server permission.** | `.chatmute @Someone` +`.chatunmute` | Removes a mute role previously set on a mentioned user with `.chatmute` which prevented him from chatting in text channels. **Requires ManageRoles server permission.** | `.chatunmute @Someone` +`.voicemute` | Prevents a mentioned user from speaking in voice channels. **Requires MuteMembers server permission.** | `.voicemute @Someone` +`.voiceunmute` | Gives a previously voice-muted user a permission to speak. **Requires MuteMembers server permission.** | `.voiceunmute @Someguy` `.rotateplaying` `.ropl` | Toggles rotation of playing status of the dynamic strings you previously specified. **Bot Owner only.** | `.ropl` `.addplaying` `.adpl` | Adds a specified string to the list of playing strings to rotate. Supported placeholders: %servers%, %users%, %playing%, %queued% **Bot Owner only.** | `.adpl` `.listplaying` `.lipl` | Lists all playing statuses with their corresponding number. **Bot Owner only.** | `.lipl` @@ -90,7 +90,7 @@ Command and aliases | Description | Usage `.greetdm` | Toggles whether the greet messages will be sent in a DM (This is separate from greet - you can have both, any or neither enabled). **Requires ManageServer server permission.** | `.greetdm` `.greetdmmsg` | Sets a new join announcement message which will be sent to the user who joined. Type %user% if you want to mention the new member. Using it with no message will show the current DM greet message. **Requires ManageServer server permission.** | `.greetdmmsg Welcome to the server, %user%`. `.bye` | Toggles anouncements on the current channel when someone leaves the server. **Requires ManageServer server permission.** | `.bye` -`.byemsg` | Sets a new leave announcement message. Type %user% if you want to mention the new member. Using it with no message will show the current bye message. **Requires ManageServer server permission.** | `.byemsg %user% has left.` +`.byemsg` | Sets a new leave announcement message. Type %user% if you want to show the name the user who left. Type %id% to show id. Using this command with no message will show the current bye message. **Requires ManageServer server permission.** | `.byemsg %user% has left.` `.byedel` | Sets the time it takes (in seconds) for bye messages to be auto-deleted. Set 0 to disable automatic deletion. **Requires ManageServer server permission.** | `.byedel 0` or `.byedel 30` `.voice+text` `.v+t` | Creates a text channel for each voice channel only users in that voice channel can see.If you are server owner, keep in mind you will see them all the time regardless. **Requires ManageRoles server permission.** **Requires ManageChannels server permission.** | `.voice+text` `.cleanvplust` `.cv+t` | Deletes all text channels ending in `-voice` for which voicechannels are not found. Use at your own risk. **Requires ManageChannels server permission.** **Requires ManageRoles server permission.** | `.cleanv+t` @@ -209,7 +209,7 @@ Command and aliases | Description | Usage `!!reptcursong` `!!rcs` | Toggles repeat of current song. | `!!rcs` `!!rpeatplaylst` `!!rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `!!rpl` `!!save` | Saves a playlist under a certain name. Name must be no longer than 20 characters and mustn't contain dashes. | `!!save classical1` -`!!load` | Loads a playlist under a certain name. | `!!load classical-1` +`!!load` | Loads a saved playlist using it's ID. Use `!!pls` to list all saved playlists and !!save to save new ones. | `!!load classical-1` `!!playlists` `!!pls` | Lists all playlists. Paginated. 20 per page. Default page is 0. | `!!pls 1` `!!deleteplaylist` `!!delpls` | Deletes a saved playlist. Only if you made it or if you are the bot owner. | `!!delpls animu-5` `!!goto` | Goes to a specific time in seconds in a song. | `!!goto 30` diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index bafae2e9..527562d0 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -3714,7 +3714,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Loads a playlist under a certain name.. + /// Looks up a localized string similar to Loads a saved playlist using it's ID. Use `{0}pls` to list all saved playlists and {0}save to save new ones.. /// public static string load_desc { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 82c89eb6..c9009e28 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -1660,7 +1660,7 @@ load - Loads a playlist under a certain name. + Loads a saved playlist using it's ID. Use `{0}pls` to list all saved playlists and {0}save to save new ones. `{0}load classical-1` From 18715a6a83151b734861b88f7e8168f06c4acf0d Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 14 Dec 2016 02:52:26 +0100 Subject: [PATCH 8/9] Woops --- docs/Commands List.md | 2 +- src/NadekoBot/Resources/CommandStrings.Designer.cs | 2 +- src/NadekoBot/Resources/CommandStrings.resx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Commands List.md b/docs/Commands List.md index 43ed3928..47a7afc3 100644 --- a/docs/Commands List.md +++ b/docs/Commands List.md @@ -209,7 +209,7 @@ Command and aliases | Description | Usage `!!reptcursong` `!!rcs` | Toggles repeat of current song. | `!!rcs` `!!rpeatplaylst` `!!rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `!!rpl` `!!save` | Saves a playlist under a certain name. Name must be no longer than 20 characters and mustn't contain dashes. | `!!save classical1` -`!!load` | Loads a saved playlist using it's ID. Use `!!pls` to list all saved playlists and !!save to save new ones. | `!!load classical-1` +`!!load` | Loads a saved playlist using it's ID. Use `!!pls` to list all saved playlists and !!save to save new ones. | `!!load 5` `!!playlists` `!!pls` | Lists all playlists. Paginated. 20 per page. Default page is 0. | `!!pls 1` `!!deleteplaylist` `!!delpls` | Deletes a saved playlist. Only if you made it or if you are the bot owner. | `!!delpls animu-5` `!!goto` | Goes to a specific time in seconds in a song. | `!!goto 30` diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index 527562d0..48967dd3 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -3723,7 +3723,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `{0}load classical-1`. + /// Looks up a localized string similar to `{0}load 5`. /// public static string load_usage { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index c9009e28..66efd152 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -1663,7 +1663,7 @@ Loads a saved playlist using it's ID. Use `{0}pls` to list all saved playlists and {0}save to save new ones. - `{0}load classical-1` + `{0}load 5` playlists pls From 99e3c7695306da5392185462a8468963c5f570a5 Mon Sep 17 00:00:00 2001 From: 01Private Date: Tue, 13 Dec 2016 21:21:19 -0800 Subject: [PATCH 9/9] Embeds + Seperate the { } thingies --- src/NadekoBot/Modules/Music/Classes/Song.cs | 19 ++++++++++++------- src/NadekoBot/Modules/Music/Music.cs | 9 +++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Classes/Song.cs b/src/NadekoBot/Modules/Music/Classes/Song.cs index 73a39ced..78ed4ffd 100644 --- a/src/NadekoBot/Modules/Music/Classes/Song.cs +++ b/src/NadekoBot/Modules/Music/Classes/Song.cs @@ -12,7 +12,7 @@ using System.Threading; using System.Threading.Tasks; using VideoLibrary; -namespace NadekoBot.Modules.Music.Classes +namespace NadekoBot.Modules.Music.Classes//{(SongInfo.Provider ?? "-")} { public class SongInfo { @@ -27,24 +27,29 @@ namespace NadekoBot.Modules.Music.Classes } public class Song { - public StreamState State { get; set; } public string PrettyName => - $"**【 {SongInfo.Title.TrimTo(55)} 】**`{(SongInfo.Provider ?? "-")}` `by {QueuerName}`"; + $"{SongInfo.Title.TrimTo(70)}"; public SongInfo SongInfo { get; } - public string QueuerName { get; set; } - public MusicPlayer MusicPlayer { get; set; } + + public string PrettyUser => + $"{QueuerName}"; + public string QueuerName { get; set; } + + public string PrettyProvider => + $"{(SongInfo.Provider ?? "No Provider")}"; + public StreamState State { get; set; } public string PrettyCurrentTime() { var time = TimeSpan.FromSeconds(bytesSent / 3840 / 50); - var str = $"【{(int)time.TotalMinutes}m {time.Seconds}s】**/** "; + var str = $"{(int)time.TotalMinutes}m {time.Seconds}s / "; if (TotalLength == TimeSpan.Zero) str += "**?**"; else if (TotalLength == TimeSpan.MaxValue) str += "**∞**"; else - str += $"【{(int)TotalLength.TotalMinutes}m {TotalLength.Seconds}s】"; + str += $"{(int)TotalLength.TotalMinutes}m {TotalLength.Seconds}s"; return str; } diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 6c4bc301..a7250d80 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -184,8 +184,13 @@ namespace NadekoBot.Modules.Music { await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); } - await channel.SendMessageAsync($"🎵`Now Playing` {currentSong.PrettyName} " + - $"{currentSong.PrettyCurrentTime()}").ConfigureAwait(false); + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName("🎵 Now Playing")) + .WithTitle($"{currentSong.PrettyName}") + .WithDescription($"{currentSong.PrettyUser}") + .WithFooter(ef => ef.WithText($"{currentSong.PrettyProvider} | {currentSong.PrettyCurrentTime()}")) + .WithColor(NadekoBot.OkColor); + await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases]