you can no longer use .die as a startup command...
This commit is contained in:
parent
f3513779b7
commit
a12702fb68
@ -48,7 +48,9 @@ namespace NadekoBot.Modules.Administration
|
|||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
public async Task StartupCommandAdd([Remainder] string cmdText)
|
public async Task StartupCommandAdd([Remainder] string cmdText)
|
||||||
{
|
{
|
||||||
//todo don't let .die be a startup command
|
if (cmdText.StartsWith(Prefix + "die"))
|
||||||
|
return;
|
||||||
|
|
||||||
var guser = ((IGuildUser)Context.User);
|
var guser = ((IGuildUser)Context.User);
|
||||||
var cmd = new StartupCommand()
|
var cmd = new StartupCommand()
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,10 @@ namespace NadekoBot.Modules.Administration.Services
|
|||||||
|
|
||||||
foreach (var cmd in bc.BotConfig.StartupCommands)
|
foreach (var cmd in bc.BotConfig.StartupCommands)
|
||||||
{
|
{
|
||||||
|
var prefix = _cmdHandler.GetPrefix(cmd.GuildId);
|
||||||
|
//if someone already has .die as their startup command, ignore it
|
||||||
|
if (cmd.CommandText.StartsWith(prefix + "die"))
|
||||||
|
continue;
|
||||||
await cmdHandler.ExecuteExternal(cmd.GuildId, cmd.ChannelId, cmd.CommandText);
|
await cmdHandler.ExecuteExternal(cmd.GuildId, cmd.ChannelId, cmd.CommandText);
|
||||||
await Task.Delay(400).ConfigureAwait(false);
|
await Task.Delay(400).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user