From 674c96be0b0f96227ef9155758f12e750fa0035e Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Sat, 2 Nov 2019 16:51:51 -0500 Subject: [PATCH] Added /help as an alias for /start --- commands.rb | 2 +- run.rb | 2 +- static_text/patchnotes.txt | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/commands.rb b/commands.rb index 45399f9..3f286a8 100644 --- a/commands.rb +++ b/commands.rb @@ -28,7 +28,7 @@ end def process_command_start(message, command, adm) reply = "I am #{@botname}, and I am here to provide temperature information from various sensors. Currently I can retrieve information " + "from temperature sensors. In a future version, I will also report when temperatures are out of a specified range through regular checks.\n\n" + - "Commands available:\n/start (Shows this message)\n/check or /c (Show a specific temperature interactively)\n/report or /r (Show all temperatures)\n" + + "Commands available:\n/start or /help (Shows this message)\n/check or /c (Show a specific temperature interactively)\n/report or /r (Show all temperatures)\n" + "/simple or /s (Show a simplified report)\n\nExtra functions:\n/whoami or /chatinfo (Provides IDs for internal use)\n/whereareyou or /location (Provides hostname for bot server)\n\n" + "Check again later to see if any new functions have been added, or use /patchnotes to learn about recent updates.\n" + "You can also view the source code at the following location:\nhttps://git.skyfall.tech/skyfall/heatbot" diff --git a/run.rb b/run.rb index fa6c463..a04da47 100755 --- a/run.rb +++ b/run.rb @@ -353,7 +353,7 @@ def handle_message(message) adm = @conf['admin'] puts timestamp + ": Received command from " + "#{message.from.username}".cyan.bold + " [" + "#{message.from.id}".cyan + "]: " + "#{command}".magenta.bold case command - when '/start' + when '/start', '/help' process_command_start(message, command, adm) when '/patch', '/patchnotes', '/version', '/versioninfo' process_command_patchnotes(message, command, adm) diff --git a/static_text/patchnotes.txt b/static_text/patchnotes.txt index 0b43997..4e95d30 100644 --- a/static_text/patchnotes.txt +++ b/static_text/patchnotes.txt @@ -1,5 +1,9 @@ SkyfallTech HeatBot Patch Notes: -v0.1.00 +v1.0.01 ++ Added /help as an alias for /start ++ Fixed logging error due to a missing STDOUT.flush + +v1.0.00 + Initial Release