.announce command, thx to @Delicious-Flatbread
This commit is contained in:
parent
b90cb958c9
commit
207539317d
@ -810,6 +810,20 @@ namespace NadekoBot.Modules.Administration
|
|||||||
Console.WriteLine(ex);
|
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:");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user