-
Notifications
You must be signed in to change notification settings - Fork 2
Custom Features
The following changes are not necessary to make, but can help you customize the bot to your preferences.
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
.
Your bot is now ready to run! In the next section, you'll learn how to launch your bot on a platform.