diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index 8e0c6b16..fc907cac 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -1000,6 +1000,21 @@ namespace NadekoBot.Modules.Administration await e.Channel.SendMessage("```xl\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join("", ig.Select(el => $"• {el,-35}")))) + "\n```"); }); + cgb.CreateCommand(Prefix + "leave") + .Description("Leaves a server with a supplied ID.\n**Usage**: `.leave 493243292839`") + .Parameter("num", ParameterType.Required) + .AddCheck(SimpleCheckers.OwnerOnly()) + .Do(async e => + { + var srvr = NadekoBot.Client.Servers.Where(s => s.Id.ToString() == e.GetArg("num").Trim()).FirstOrDefault(); + if (srvr == null) + { + return; + } + await srvr.Leave(); + await e.Channel.SendMessage("`Done.`"); + }); + }); }