From 562e561dba8155fcb18ca6640cc55755e9b257df Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Wed, 4 May 2016 06:27:49 +0200 Subject: [PATCH] You can now just type `.st` in order to clear channel topic. closes #260 --- NadekoBot/Modules/Administration/AdministrationModule.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index a3ac1eaf..7a20cba5 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -499,14 +499,12 @@ namespace NadekoBot.Modules.Administration cgb.CreateCommand(Prefix + "st").Alias(Prefix + "settopic") .Alias(Prefix + "topic") - .Description("Sets a topic on the current channel.") + .Description($"Sets a topic on the current channel.\n**Usage**: `{Prefix}st My new topic`") .AddCheck(SimpleCheckers.ManageChannels()) .Parameter("topic", ParameterType.Unparsed) .Do(async e => { - var topic = e.GetArg("topic"); - if (string.IsNullOrWhiteSpace(topic)) - return; + var topic = e.GetArg("topic")?.Trim() ?? ""; await e.Channel.Edit(topic: topic).ConfigureAwait(false); await e.Channel.SendMessage(":ok: **New channel topic set.**").ConfigureAwait(false); });