diff --git a/NadekoBot/Modules/Conversations/Conversations.cs b/NadekoBot/Modules/Conversations/Conversations.cs index cdc6eb26..328be562 100644 --- a/NadekoBot/Modules/Conversations/Conversations.cs +++ b/NadekoBot/Modules/Conversations/Conversations.cs @@ -9,13 +9,14 @@ using System; using System.Diagnostics; using System.IO; using System.Linq; +using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Conversations { internal class Conversations : DiscordModule { - private const string firestr = "🔥 ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้ 🔥"; + private const string firestr = "🔥 ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้ 🔥"; public Conversations() { commands.Add(new RipCommand(this)); @@ -153,22 +154,23 @@ namespace NadekoBot.Modules.Conversations .Parameter("times", ParameterType.Optional) .Do(async e => { - var count = 1; - int.TryParse(e.Args[0], out count); - if (count == 0) + int count; + if (string.IsNullOrWhiteSpace(e.Args[0])) count = 1; + else + int.TryParse(e.Args[0], out count); if (count < 1 || count > 12) { - await e.Channel.SendMessage("Number must be between 0 and 12").ConfigureAwait(false); + await e.Channel.SendMessage("Number must be between 1 and 12").ConfigureAwait(false); return; } - var str = ""; + var str = new StringBuilder(); for (var i = 0; i < count; i++) { - str += firestr; + str.Append(firestr); } - await e.Channel.SendMessage(str).ConfigureAwait(false); + await e.Channel.SendMessage(str.ToString()).ConfigureAwait(false); }); cgb.CreateCommand("dump")