diff --git a/run.rb b/run.rb index 8575dea..99a2ee7 100755 --- a/run.rb +++ b/run.rb @@ -99,6 +99,7 @@ def handle_message(message) when '/srvstop' reply = process_command_srvstop(message, command, adm) when '/status' + #reply = process_command_srvstatus(message, command, adm) if is_chat_authorized?(message, @auth_chat) || message_from_admin?(message, adm) reply = `./scripts/srvstatus #{telnet['host']} #{telnet['port']} #{telnet['pass']}` else @@ -125,6 +126,12 @@ def handle_message(message) else reply = "Refusal: I am not authorized to bust a move in this location." end + when '/flex' + if is_chat_authorized?(message, @auth_chat) || message_from_admin?(message, adm) + reply = "flex" + else + reply = "Refusal: I am not authorized to bring the gun show to this location." + end else reply = "Mockery: My name is #{message.from.username}, I am a meatbag, and I think #{command} is a valid command." end @@ -136,8 +143,8 @@ end Telegram::Bot::Client.run(token) do |bot| bot.listen do |message| reply = handle_message(message) - if reply == "dance" - bot.api.sendVideo(chat_id: message.chat.id, video: 'https://img.skyfalltech.net/togra/dance.gif') + if reply == "dance" || reply == "flex" + bot.api.sendVideo(chat_id: message.chat.id, video: "https://img.skyfalltech.net/togra/#{reply}.gif") else bot.api.send_message(chat_id: message.chat.id, text: "#{reply}") end