-
python ^3.10
(you can use pyenv to manage multiple versions of python) -
.env
file in the root of this repository with the following entries:- DISCORD_TOKEN
- your discord bots token
- FRONTEND_URL
- the url the frontend that users interact with lives at. use the hostname of your local deployment of the glue frontend for development and
https://<frontend-canister-id>.ic0.app
for production
- the url the frontend that users interact with lives at. use the hostname of your local deployment of the glue frontend for development and
- MONGO_USERNAME
- your mongo dbs username
- omit if your database doesnt require authentication
- MONGO_PW
- the mongo db usernames password
- omit if your database doesnt require authentication
- MODE
- this can either be 'development' or 'production'
- in development mode, the bot commands will be synced to your guild only. in production mode, the bot commands will be synced to all guilds.
- TEST_GUILD_ID
- the id of the guild that the bot will sync the commands to. this is only used in development mode.
- DISCORD_TOKEN
- run
poetry install
to install all dependencies - run
poetry shell
to start the virtual environment - run
glue
from the root of this repository (where your.env
file is located) to start the bot
- you can run the bot within a
screen
session on your server - to install it, run
pip install --force-reinstall git+ssh://[email protected]/glue-org/glue-bot
. after that runglue
to start the bot. make sure the.env
file is present in the current working directory.
Owners of a discord server can invite the bot to their server. The bot can be invited to multiple servers. As soon as the bot is part of the channel, it can be setup using slash commands.
Users on the the server that have the general admin role can setup the bot. This way they can give a role to people that hold a certain NFT. They will need to specify the NFT standard, the canister principal, the name of the project and the role they want to give to verified users. The setup takes place using slash bot commands.
Admins can remove the bot from the server. This won't delete the channels or roles created by the bot. It will also not take away token holder roles from users.
Guild members can verify their assets with the bot by clicking on the link generated by the bot and put in a public channel by the server owner. When visiting the website the user has to login with their discord account. After that the user has to send a message to a canister to prove that she owns a specific principal. The bot will then check if the principal holds NFTs of the NFT canister it is setup for. If this is the case, the "token granted role" will be assigned.