We're create a bot in a Discord dashboard.
-
Go to discord.com/developers and sign in with your account. (After, automatically redirect to applications section)
-
If you're a lazy person, you can copy the link below and replace
YOUR_APPLICATION_ID
with yourAPPLICATION ID
save above.
If you're a good programmer and you learn and don't just copy paste, you can follow the steps below:- Click on OAuth2 section and select
bot
. - Select the permissions that watch the image below and copy the link.
- Paste the link in your browser and select the server where you want to add the bot.
For lazy people:
https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&permissions=1978101132400&scope=bot
- Click on OAuth2 section and select
-
Go to Bot section and click on Reset Token, copy the token and save it for later.
⚠️ Be careful with publish the token in internet. -
Go to server that you added the bot in Step 5.
In the left side bar you right click en your server and copyServer ID
and save it for later. (If you don't see the Copy Server ID button, go to User Settings -> Advanced -> Developer Mode and enable it, or read this article)
-
Copy the
.env.example
file and rename it to.env
. Remplace the values with the values saved in the previous steps.cp .env.example .env
-
Use the Node.js version specified in the
.nvmrc
file. (Install it if you don't have it installed yet.)nvm use
-
Install the dependencies.
pnpm install
-
Run the bot.
pnpm dev
Create initial database schema in database
pnpm prisma migrate dev --name init
You can run this command in separate terminal
pnpm studio
- Update README with prisma commands