You can now just type .st in order to clear channel topic. closes #260

This commit is contained in:
Master Kwoth 2016-05-04 06:27:49 +02:00
parent e92a6c9c9c
commit 562e561dba

View File

@ -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);
});