TNBC Discord bot (outdated source)
Add the bot https://discord.com/api/oauth2/authorize?client_id=823155121197416458&permissions=8&scope=bot
A basic bot to create asscossiation between wallet addresses and discord users. This way people can find each others' real and trusted address on a platform where they know they are talking to the correct person.
Install python 3.9 to your computer, and make sure to include the "add to path" option during installation, as well as the "pip" package option
- Log in to the Discord Developer Portal
- Create your testing bot by pressing "New Application" at the top right, then naming your app
- In the new application, go to the "Bot" section
- Press "Add Bot" and then confirm the creation
- In the new "Bot" section, note the "token" as you will need to copy it for later
- Enable "server members intent"
- Go to "OAuth2" and select the "bot" scope to generate an invite link to your bot
- Invite your bot to whatever discord server you would like to test the bot on.
- Download the latest version from the main branch
- Head into the folder holding "thenewboston.py" using a terminal
- Install the requirements using pip:
pip install -r requirements.txt
- Copy the
example.env
file to a new file called.env
and replace the values with the preferred ones. - The token copied earlier, in the step 5 of "Discord Bot Creation" should be the value of
DISCORD_TOKEN
- Run "python thenewboston.py" in the terminal (Will not work well until the API is set up, as you have no DB yet)
- Open a terminal in the
API
folder' - Run
python manage.py makemigrations
andpython manage.py migrate
to generate your database - Run
python manage.py createsuperuser
to create an admin login to your API so you can manage your database easily - Run
python manage.py runserver
(And you can optionally add a space after it and then0.0.0.0:PORT
to specify a port) - Head to
127.0.0.1:PORT/API/users
to see if the users' info shows up
To manually manage the database, head to 127.0.0.1:PORT/admin
and log in, then go to the "Users" model under "MAIN"
This was written without any double-checking or testing, but should work. If there are any issues, feel free to open an issue and we will try to resolve it ASAP.