From 28db0e95f57de318dcbd22685de0954b5496d485 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 22 Mar 2016 08:29:17 +0100 Subject: [PATCH] .topic command added, closes #128 --- NadekoBot/Modules/Administration.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index 3da7fa67..8caf2fc0 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -631,6 +631,7 @@ namespace NadekoBot.Modules { .Description("Add a donator to the database.") .Parameter("donator") .Parameter("amount") + .AddCheck(SimpleCheckers.OwnerOnly()) .Do(async e => { await Task.Run(() => { if (!NadekoBot.IsOwner(e.User.Id)) @@ -649,6 +650,18 @@ namespace NadekoBot.Modules { }); }); + cgb.CreateCommand(Prefix + "topic") + .Description("Sets current channel's topic.") + .Parameter("topic", ParameterType.Unparsed) + .AddCheck(SimpleCheckers.ManageChannels()) + .Do(async e => { + var topic = e.GetArg("topic"); + if (string.IsNullOrWhiteSpace(topic)) + return; + await e.Channel.Edit(topic: topic); + await e.Channel.SendMessage(":ok: **New channel topic set.**"); + }); + cgb.CreateCommand(Prefix + "videocall") .Description("Creates a private appear.in video call link for you and other mentioned people. The link is sent to mentioned people via a private message.") .Parameter("arg", ParameterType.Unparsed)