diff --git a/NadekoBot/Commands/ServerGreetCommand.cs b/NadekoBot/Commands/ServerGreetCommand.cs index 3e64d1bd..dbe66545 100644 --- a/NadekoBot/Commands/ServerGreetCommand.cs +++ b/NadekoBot/Commands/ServerGreetCommand.cs @@ -236,7 +236,7 @@ namespace NadekoBot.Commands { AnnouncementsDictionary[e.Server.Id].ToggleByePM(); if (AnnouncementsDictionary[e.Server.Id].ByePM) - await e.Send("Bye messages will be sent in a PM from now on.\n :warning: Keep in mind this might fail if the user and the bot have no common servers after the user leaves."); + await e.Send("Bye messages will be sent in a PM from now on.\n ⚠ Keep in mind this might fail if the user and the bot have no common servers after the user leaves."); else await e.Send("Bye messages will be sent in a bound channel from now on."); if (!AnnouncementsDictionary[e.Server.Id].Bye) diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index d46e3129..fd8fca96 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -82,28 +82,18 @@ namespace NadekoBot.Modules { }); cgb.CreateCommand(".r").Alias(".role").Alias(".cr") - .Description("Creates a role with a given name, and color.\n**Usage**: .r AwesomeRole Orange") - .Parameter("role_name", ParameterType.Required) - .Parameter("role_color", ParameterType.Optional) + .Description("Creates a role with a given name.**Usage**: .r Awesome Role") + .Parameter("role_name", ParameterType.Unparsed) .Do(async e => { if (!e.User.ServerPermissions.ManageRoles) return; - - var color = Color.Blue; - if (e.GetArg("role_color") != null) { - try { - if (e.GetArg("role_color") != null && e.GetArg("role_color").Trim().Length > 0) - color = (typeof(Color)).GetField(e.GetArg("role_color")).GetValue(null) as Color; - } catch (Exception ex) { - Console.WriteLine(ex.ToString()); - await e.Send("Please supply a proper color.\n Example: DarkBlue, Orange, Teal"); - return; - } - } + if (string.IsNullOrWhiteSpace(e.GetArg("role_name"))) + return; try { var r = await e.Server.CreateRole(e.GetArg("role_name")); - await r.Edit(null, null, color); - await e.Send($"Successfully created role **{r.ToString()}**."); - } catch (Exception) { } + await e.Send($"Successfully created role **{r.Name}**."); + } catch (Exception ex) { + await e.Send(":warning: Unspecified error."); + } }); cgb.CreateCommand(".rolecolor").Alias(".rc") @@ -438,7 +428,7 @@ namespace NadekoBot.Modules { await Task.Delay(500); } }); - } catch (Exception) {} + } catch (Exception) { } bool throwaway; clearDictionary.TryRemove(e.Server, out throwaway); }); diff --git a/NadekoBot/Modules/Searches.cs b/NadekoBot/Modules/Searches.cs index fee6875a..41e1b370 100644 --- a/NadekoBot/Modules/Searches.cs +++ b/NadekoBot/Modules/Searches.cs @@ -195,7 +195,7 @@ namespace NadekoBot.Modules { images.Add(System.Drawing.Bitmap.FromStream(await GetResponseStream(item["img"].ToString()))); } if (items.Count > 4) { - await e.Send(":warning: Found over 4 images. Showing random 4."); + await e.Send("⚠ Found over 4 images. Showing random 4."); } Console.WriteLine("Start"); await e.Channel.SendFile(arg + ".png", (await images.MergeAsync()).ToStream(System.Drawing.Imaging.ImageFormat.Png));