This repository is archived. The Code Hunting Games bot has been superseded by the Code Week version.
Source code of the Code Hunting Games bot for Telegram. Visit the official website for further information on how to play the game and how to organize your own games.
Developed at the University of Urbino (Italy) for the CodeMOOC course.
Are you organizing Code Hunting Games in your country and the bot is not yet localized? Check out the bot’s translation project on CrowdIn.
Source code pull requests are welcome. Please also check out issues to give feedback on errors, possible bugs, or improvements.
A Code Hunting Games session can very easily be organized for free using our @treasurehuntbot.
If you want to deploy your bot on your own, requirements are as follows:
In order to install the bot, please proceed as follows:
/src
through the PHP interpreter./src/config-template.php
file to /src/config.php
and edit if as follows:
TELEGRAM_BOT_TOKEN
to your Telegram bot's token,DATABASE
constants to point to your local MySQL and ensure that the database user you are setting has read/write access,BOT_DEEPLINK_START_ROOT
, replacing BOTNAME
with your Telegram bot's nickname./sql/treasurehuntbot.sql
script,php pull.php
(in directory /src
): this will attempt to process Telegram messages you send to your bot in pull mode.curl -F "url=https://YOURDOMAIN/PATH-TO-BOT/src/hook.php" https://api.telegram.org/botBOTTOKEN/setWebhook
(Make sure to replace the URL with the correct path to your server and the TOKEN
with your Telegram bot's token.)
That is all: the bot should now respond to your messages automatically. You're all set and ready to create your own Code Hunting Games.