Skip to content

ultraio/ultra-discord-uniq-roles-bot

Repository files navigation

Ultra Uniq Discord Bot

Our goal with this bot is to allow users of our Blockchain to easily bind Uniq Factories against Discord Roles.

Which allows for users of Discord to bind their Discord Account to the Ultra Blockchain.

Upon connecting their account to this bot it will then periodically update roles for a user based on what roles have bindings with a uniq factory.

Read More...

Read About Client...

Read About Server...


⚙️ Prerequisites


🚀 Setup

Clone the repository

git clone https://github.com/ultraio/ultra-discord-uniq-roles-bot

Navigate into the newly created folder

cd ultra-discord-uniq-roles-bot

Install npm packages

npm install

Create an .env file in the packages/server folder.

Fill it out with the environment variable information.

See the Environment Variables section for more info.

See the Discord Bot Setup to deploy your bot.

DISCORD_BOT_TOKEN=
APPLICATION_ID=
GUILD_ID=
WEBSERVER_PORT=3000
CNAME=localhost
MONGODB_URL=mongodb://USERNAME:PASSWORD@HOST

🏁 Start the Bot

Depending on your environment and usecase you will want to use one of the following commands to start the bot.

Production

Builds both Client & Server, then Starts the Bot.

HTML files are automatically built to packages/server/dist/html.

npm run start -ws

Development

Use this if you are making changes.

Ultra Wallet requires an HTTP(s) server to work with it.

This starts a Vite Server with local https, and the server without feeding the built pages through the endpoint.

npm run dev -w packages/server

Docker

These are general purpose docker instructions based off this repository.

Start by adding your .env file to packages/server/.env

Run the following to start the bot.

docker build -t uniqbot .
docker compose up