Update SelfCommands.cs
This commit is contained in:
parent
e6cd56946c
commit
d899f13f71
@ -24,8 +24,6 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
.Do(async e =>
|
.Do(async e =>
|
||||||
{
|
{
|
||||||
var arg = e.GetArg("arg")?.Trim();
|
var arg = e.GetArg("arg")?.Trim();
|
||||||
if (string.IsNullOrWhiteSpace(arg))
|
|
||||||
return;
|
|
||||||
var server = NadekoBot.Client.Servers.FirstOrDefault(s => s.Id.ToString() == arg) ??
|
var server = NadekoBot.Client.Servers.FirstOrDefault(s => s.Id.ToString() == arg) ??
|
||||||
NadekoBot.Client.FindServers(arg.Trim()).FirstOrDefault();
|
NadekoBot.Client.FindServers(arg.Trim()).FirstOrDefault();
|
||||||
if (server == null)
|
if (server == null)
|
||||||
@ -33,7 +31,6 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
await e.Channel.SendMessage("Cannot find that server").ConfigureAwait(false);
|
await e.Channel.SendMessage("Cannot find that server").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var serverId = server.Id;
|
|
||||||
if (!server.IsOwner)
|
if (!server.IsOwner)
|
||||||
{
|
{
|
||||||
await server.Leave();
|
await server.Leave();
|
||||||
|
Loading…
Reference in New Issue
Block a user