From c37c959632206e09e21e139b77bcbb236d5c5883 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 28 Jul 2016 17:15:32 +0100 Subject: [PATCH] Add info command --- TriviaBot/bot/GatewayHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TriviaBot/bot/GatewayHandler.cpp b/TriviaBot/bot/GatewayHandler.cpp index 712b4f9..f15ab29 100644 --- a/TriviaBot/bot/GatewayHandler.cpp +++ b/TriviaBot/bot/GatewayHandler.cpp @@ -153,6 +153,9 @@ void GatewayHandler::on_dispatch(json decoded, client &c, websocketpp::connectio } ah->send_message(channel->id, m); } + else if (words[0] == "`info") { + ah->send_message(channel->id, ":information_source: trivia-bot by Jack. "); + } else if (games.find(channel->id) != games.end()) { // message received in channel with ongoing game games[channel->id]->handle_answer(message, sender); }