You can now just type .st
in order to clear channel topic. closes #260
This commit is contained in:
parent
e92a6c9c9c
commit
562e561dba
@ -499,14 +499,12 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
cgb.CreateCommand(Prefix + "st").Alias(Prefix + "settopic")
|
cgb.CreateCommand(Prefix + "st").Alias(Prefix + "settopic")
|
||||||
.Alias(Prefix + "topic")
|
.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())
|
.AddCheck(SimpleCheckers.ManageChannels())
|
||||||
.Parameter("topic", ParameterType.Unparsed)
|
.Parameter("topic", ParameterType.Unparsed)
|
||||||
.Do(async e =>
|
.Do(async e =>
|
||||||
{
|
{
|
||||||
var topic = e.GetArg("topic");
|
var topic = e.GetArg("topic")?.Trim() ?? "";
|
||||||
if (string.IsNullOrWhiteSpace(topic))
|
|
||||||
return;
|
|
||||||
await e.Channel.Edit(topic: topic).ConfigureAwait(false);
|
await e.Channel.Edit(topic: topic).ConfigureAwait(false);
|
||||||
await e.Channel.SendMessage(":ok: **New channel topic set.**").ConfigureAwait(false);
|
await e.Channel.SendMessage(":ok: **New channel topic set.**").ConfigureAwait(false);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user