Added .restart (not sure if it will work on linux)
This commit is contained in:
parent
872b7bc1df
commit
6aa15c89ae
@ -43,6 +43,17 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
commands.ForEach(cmd => cmd.Init(cgb));
|
commands.ForEach(cmd => cmd.Init(cgb));
|
||||||
|
|
||||||
|
cgb.CreateCommand(Prefix + "restart")
|
||||||
|
.Description("Restarts the bot. Might not work.")
|
||||||
|
.AddCheck(SimpleCheckers.OwnerOnly())
|
||||||
|
.Do(async e =>
|
||||||
|
{
|
||||||
|
await e.Channel.SendMessage("`Restarting in 2 seconds...`");
|
||||||
|
await Task.Delay(2000);
|
||||||
|
System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||||
|
Environment.Exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
cgb.CreateCommand(Prefix + "sr").Alias(Prefix + "setrole")
|
cgb.CreateCommand(Prefix + "sr").Alias(Prefix + "setrole")
|
||||||
.Description("Sets a role for a given user.\n**Usage**: .sr @User Guest")
|
.Description("Sets a role for a given user.\n**Usage**: .sr @User Guest")
|
||||||
.Parameter("user_name", ParameterType.Required)
|
.Parameter("user_name", ParameterType.Required)
|
||||||
|
Loading…
Reference in New Issue
Block a user