.leave commands added
This commit is contained in:
parent
c540b2c3d6
commit
221d5d9028
@ -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```");
|
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.`");
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user