Skip to content
This repository was archived by the owner on Nov 19, 2022. It is now read-only.

Custom Features

Cameron Rodriguez edited this page Jun 20, 2019 · 8 revisions

This page is maintained for legacy support, and only applies for programs on version 1.x.x. For the latest instructions, return to the homepage.


The following changes are not necessary to make, but can help you customize the bot to your preferences.

Making the source code and Tweets your own

There are a number of references within the source code that are specific to XKCDAltTextBot. You can change these to apply to your scenario, but you must be consistent with the changes. This includes any mention of a term as part of a variable. For example, if app becomes newapp, then app_payload becomes newapp_payload.

These are the changes to make:

Description of element to change Original Reference New Reference
Target account short reference comic target
Target account handle xkcdComic targetacc
Your account short reference alt bot
Your account handle XKCDAltTextBot botacc

You can also make custom changes to the logs on lines 171, 175, 179, 187, 227, and 233. You can modify the standard prefix and suffix of the Tweets on line 177.

Finally, you can rename the file itself (xkcd_alt.py) to make it more applicable to your bot. If you choose too do this, you must open the file Procfile and change worker: python xkcd_alt.py to worker: python BOT_PROGRAM.py.

Next Steps

Your bot is now ready to run! In the next section, you'll learn how to launch your bot on a platform.

← Different Websites // Running your Bot →

Clone this wiki locally