DankBot is a simple Telegram Bot which sends, generates, and deep fries memes.
DankBot has been an extremely fun project to work on.
The idea itself started off as a joke - My friends and I would often reference memes in our conversations and wishfully discuss about a tool that would share memes in response to certain triggers. While the idea of making a bot had occurred to me, the fact that Whatsapp, our primary communications app, didn't have a public API was discouraging. After a lot of deliberation, I began this project on the fourth of September, 2018.
- Python 3.7
- PIL (Pillow)
- OpenCV
- Numba
- Python Telegram Bot
- Papertrail
- Building stateless, event-driven bots
- Manipulating images with PIL
- Uploading images to Imgur with PyImgur
- Detecting characters and eyes in images using OpenCV
- Extracting frames from a video and making videos from a series of frames using OpenCV + imutils.
- Using Numba JIT and asynchronous execution to improve performance
- Applying binary search on discrete functions (Used to calculating optimum text size in the meme generator)
- Using papertrail for centralized logging
- Static log analysis (DankBot Stats)
Each of these commands trigger a certain response.
For most commands, there are multiple responses from which one is randomly picked.
- Hmmm
- Boom son
- Just do it
- E
- Hello there
- I don't think so
- Wut / Wat / Dude what / What even / What the
- Ironic
- F / RIP
- ???
Generates a meme using either the Robbie Rotten, Babushka, or Drake template in which ABC is chosen over XYZ.
Converts text that follows the colon to aLt CaSe. It deletes the trigger message if bot has admin rights.
Converts text that follows the colon to Vaporwave text. It deletes the trigger message if bot has admin rights.
Replaces the first consonant group of each word with a 🅱.
It doesn't replace those consonants which can (mostly) be pronounced after a B.
Sends a GIF of the Despacito music video along with an audio file of Despacito.
If a number x is given, certain effects are applied to the audio.
If not, the audio file has a 10% chance of being extremely bass boosted.
Creates a meme with the provided captions: ABC as the top-text and XYZ as the bottom-text. By default, the captions are converted to upper case. Replacing T with Ts and B with Bs prevents auto-capitalization.
The Deep Fryer fries images, GIFs, or videos (Experimental). Frying includes increasing saturation & contrast, and adding noise, emojis, laser eyes, and bulges.
The action is triggered by replying to a message containing a media file with one of the following commands:
- Fry: 1 cycle of frying.
- Nuke: 3 cycles of frying.
- Tsar Bomba: 5 cycles of frying.
Deep: High contrast and saturation increase.
Shallow: Low contrast and saturation increase.
High-fat: Emojis are increased.
Low-fat: Emojis are reduced.
No-fat: Emojis aren't added.
Heavy: Extra bulges are added.
Light: No bulges are added.
Vitamin-B: (Experimental) Adds the B emoji on text in the image.
Chilli: (Experimental) Adds laser eyes.