From 207539317d2ff38cb24c9ae6022f61106d33dcdf Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sat, 23 Apr 2016 08:40:01 +0200 Subject: [PATCH] .announce command, thx to @Delicious-Flatbread --- .../Modules/Administration/AdministrationModule.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index 5fc0e4c6..04452192 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -810,6 +810,20 @@ namespace NadekoBot.Modules.Administration Console.WriteLine(ex); } }); + + cgb.CreateCommand(Prefix + "announce") + .Description($"Sends a message to all servers' general channel bot is connected to.**Owner Only!**\n**Usage**: {Prefix}announce Useless spam") + .Parameter("msg", ParameterType.Unparsed) + .AddCheck(SimpleCheckers.OwnerOnly()) + .Do(async e => + { + foreach (var ch in NadekoBot.Client.Servers.Select(s => s.DefaultChannel)) + { + await ch.SendMessage(e.GetArg("msg")); + } + + await e.Channel.SendMessage(":ok:"); + }); }); }