From 6f0b663d84ef64ad4109c9d1cac840cc69e946d9 Mon Sep 17 00:00:00 2001 From: takumi091111 Date: Mon, 23 Oct 2017 20:17:12 +0900 Subject: [PATCH] Added "reboot" command --- lib/commands/basic.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/commands/basic.rb b/lib/commands/basic.rb index 6b07be4..533644e 100644 --- a/lib/commands/basic.rb +++ b/lib/commands/basic.rb @@ -31,6 +31,12 @@ module Bot nil end + command(:reboot, usage: 'reboot', description: 'Botを再起動') do |event| + next unless event.author == '153106386585255936' + exec 'ruby main.rb' + nil + end + command(:shutdown, usage: 'shutdown', description: 'Botを終了') do |event| next unless event.author == '153106386585255936' exit(0)