TaterBot is a personal Discord bot that serves as a cross-server spectater and communitater. π₯πΎπ
It lets me (hereafter referred to as a "Potato") connect with a group of people that I love dearly (hereafter referred to as "Clowns") even though my actual Discord account is no longer in their server. Frankly, it's an overengineered way for me to maintain boundaries and protect my mental health, because I'm my own worst sabotater.
TMI (too much information) - Maybe.
LOL (lots of love) -
Absolutely. π
Are you also a Potato looking to associtate with a group of Clowns? Maybe TaterBot can help you out. It's a shy bot that forms a very strong attachment to its Potato, so it isn't publicly hosted anywhere - but you're more than welcome to install/clone/fork this project and run your own personal TaterBot! π
First, you'll need to make sure you have a few things ready in order to properly care for your TaterBot:
- Python 3.10 - https://www.python.org/downloads/release/python-3108/
pip
(usually auto-installed with Python) - https://pip.pypa.io/en/stable/installation/git
(just for installation; no need to know how to use it) - https://git-scm.com/downloads- Basic familiarity with the terminal or "command line" on your system
Do you meet the adoption requirements? If so, let's get this Potato rolling! π₯
You can install and/or uptate TaterBot by using this command:
pip install -U git+https://github.com/nuztalgia/taterbot.git
Once you've installed TaterBot, you can run it by using this command from any directory:
taterbot
For information about the available command-line options, run
taterbot -h
(or click to expand this section).
usage: taterbot [-f] [-t] [-v] [--help] [<token id>]
A Discord bot that serves as a cross-server spectater and communitater.
Run "taterbot" with no parameters to start the bot in development mode.
positional arguments:
<token id> The ID of the token to use to run the bot.
Valid options are "dev" and "prod".
options:
-f, --force-sync Force-sync all TaterBot app commands.
-t, --tokens View/manage your saved Discord bot tokens.
-v, --version Display the current bot version.
-h, --help Display this help message.
If everything was planted correctly, you should see something like this after
running taterbot
for the first time:
taterbot: You currently don't have a saved development bot token.
Would you like to add one now? If so, type "yes" or "y":
A bot token is essentially the "key" to your bot's Discord account. It's used for authorizing API requests and carries all of your bot's permissions, which makes it a very sensitive piece of data. It should never be shared with other people. For these reasons, TaterBot uses Botstrap to safely encrypt/store tokens and avoid potential security disastaters. π₯
If you don't have a bot token and want more info on how to get one, click to to expand this section.
-
To obtain a bot token, you'll first have to create a new Discord App. Go to the Developer Portal and click the New Application button in the top-right corner. Enter an appeeling name for your bot and click Create.
-
Now you should be on the General Information page for your app. Give it a cute profile picture and description - these will be visible to your Clowns! After tating care of those two things, you can move on from this page.
-
The next step is to add a "bot user" to your app, which allows it to appear in Discord similarly to other members. Navitate to the Bot page using the sidebar menu on the left, then click the Add Bot button on the right.
-
After creating a bot user, you should see a Reset Token button. Click it to genertate your bot token! π
If you have a bot token but are unsure of how to proceed through the Botstrap setup, click to expand this section.
-
At the initial prompt that asks
Would you like to add one now?
, typeyes
(or justy
) and hit Enter. -
Next, you'll be asked to enter your bot token (i.e. copy and paste it in). When you do, your input won't be visible on the screen - this is by design, to keep your token safe! Just trust that it's there, and hit Enter again.
-
If you entered your token correctly, you'll be prompted to run your bot. Go ahead and type
y
, then hit Enter.
After you set up your token and your bot successfully authentitates with Discord, you should see this message:
TaterBot is online and ready!
Congratutations, you're now the proud Potato parent of a tiny Tater tot! πΆ
So your bot is online and ready, but where exactly is it? If you haven't added it to any Discord servers yet, you should check your potato clock... because it's time for your TaterBot to put down its roots! π
Open up the Developer Portal (again) and select your app. Navitate to the Bot page using the sidebar menu on the left, then scroll down a little bit. There are two switches that you need to flip on this page:
- Server Members Intent - This should be turned ON.
- Message Content Intent - This should be turned ON.
Make sure to leave all the other switches as they originally were!
Next, click OAuth2 in the sidebar menu on the left. It'll expand to reveal
two sub-pages - click the one labeled URL Generator. On this page, select
the bot
checkbox, and another section will appear.
There are seven new checkboxes that you need to select in order for your
TaterBot to work, and they're all in the Text Permissions column:
Send Messages
, Embed Links
, Attach Files
, Read Message History
,
Use External Emojis
, Add Reactions
, and Use Slash Commands
.
Once you've selected all the appropriate permissions, click the Copy button in the bottom-right corner of the page. Send the result (your TaterBot's custom invite link) to a trusted Clown, then wait anxiously for them to accept it. π€‘
A server admin for the Clowns will have to open the bot invite link provided by the Potato in order to allow their TaterBot to facilitate communitation. Upon doing so, they should see a dialog that looks similar to the one in the picture to the right - but with different names and icons, of course. (You did give your bot a cute name and avatar like the instructions said to do... right? π)
The Clowns admin should verify that the requested permissions are
Send Messages
, Embed Links
, Attach Files
, Read Message History
,
Add Reactions
, Use External Emojis
, and last but not least,
Use Application Commands
. They should then grant your TaterBot these
permissions and add it to the server by clicking the Authorize
button.
Are you a fellow computater programmer? If so, you might be interested in these commands:
git clone https://github.com/nuztalgia/taterbot.git
cd taterbot
pip install -e .
This will create an
editable
installation of TaterBot in your current environment. Any changes you make to
its code will immediately take effect when you run taterbot
locally.
Contributions to this project are very welcome, as long as they pass all the checks to keep it green and healthy! π
Source Code: Copyright Β© 2022-2023 Nuztalgia. Released under the MIT License.
Image Assets: Included under fair use
and not covered by the above license. See
assets/README.md
for more details.