This Telegram bot keeps track of 'dank' times such as 13:37 and 04:20, and awards points to users who call them out in chat. This bot is highly configurable, allowing you to define custom 'dank' times, the points awarded for calling them out, the messages the bot sends, and so forth. Developers are encouraged to contribute to this bot to expand it even further.
- Make sure you're an administrator of the group.
- Go to the group's settings.
- Click on add members.
- In the search bar, search for 'danktimesbot'.
- In the search results, click on DankTimesBot.
- Click on invite.
The bot should now have been added to the group. Type /start
to start the bot or /help
to show the available commands.
- In the search bar, search for 'danktimesbot'.
- In the global search results, click on DankTimesBot.
- Click on start at the bottom of the opened chat.
You should now have opened a chat with the bot and the bot should have started. Type /help
to show the available commands.
- Create your own bot via the BotFather following the official guide.
- Git clone or download the version you wish to host to a location of your choosing. If you've downloaded it, make sure to unzip.
- Install NodeJS with npm if you haven't already.
- Install TypeScript for transpiling the code to JavaScript.
- Go to the root of the cloned/downloaded folder.
- Open a terminal or console, type
npm install
, and hit enter to download the dependencies. - Type
npm start
and hit enter. A script will run to transpile the code to JavaScript and launch the bot. - You will likely receive an error saying there was no API key found. This refers to the API key supplied to you by the BotFather. You can either insert this key in the newly generated file config.json in the data folder, or you can create an environment variable containing the API key named 'DANK_TIMES_BOT_API_KEY'.
- Type
npm start
and hit enter once again. The bot should now be running.
You can contribute to DankTimesBot in two ways:
- Creating issues to suggest enhancements and bug fixes;
- Helping develop the codebase by forking the repository and making a pull request;
- Creating plugins for the bot. See the example plugin in plugins/example-plugin.
The workflow for helping develop the codebase is as follows:
- Versioning of DankTimesBot is accomplished via tags on the master branch, e.g. 'v.1.1.0';
- The master branch always contains the latest stable release;
- Upcoming releases are worked on in seperate develop branches, e.g. 'dev-1.1.0'. Develop branches should always contain the latest stable version of the corresponding upcoming release;
- Development on individual features and fixes is done in feature branches, e.g. 'dev-1.1.0-#10-add-a-readme.md';
- Once such a feature or fix is fully implemented and tested, a pull request to the corresponding develop branch may be made. If the request is approved, then the code is pulled;
- Once all of an upcoming release's goals have been reached, its corresponding develop branch is merged to the master branch and a new version tag is added.