.topic command added, closes #128

This commit is contained in:
Master Kwoth 2016-03-22 08:29:17 +01:00
parent 04cbd7df70
commit 28db0e95f5

View File

@ -631,6 +631,7 @@ namespace NadekoBot.Modules {
.Description("Add a donator to the database.") .Description("Add a donator to the database.")
.Parameter("donator") .Parameter("donator")
.Parameter("amount") .Parameter("amount")
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e => { .Do(async e => {
await Task.Run(() => { await Task.Run(() => {
if (!NadekoBot.IsOwner(e.User.Id)) 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") 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.") .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) .Parameter("arg", ParameterType.Unparsed)