https://github.com/thekicker/node-discord-bot
https://github.com/thekicker/node-discord-bot
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thekicker/node-discord-bot
- Owner: TheKicker
- Created: 2022-08-25T13:25:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-16T21:31:32.000Z (over 3 years ago)
- Last Synced: 2025-06-03T11:39:19.474Z (about 1 year ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Discord Bot - Node JS Tutorial
Traversy Media - https://www.youtube.com/watch?v=BmKXBVdEV0g
## Getting Started
1. Create your bot on Discord's Developer Portal
- New Application (Give it a name)
- Bot tab, generate a Token (Store in .env file)
- OAuth tab, copy client id
- Visit: https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot
- Add it to your server
2. Create a script to actually log the bot in
## Links
Discord:
```
https://discord.com/
```
Discord Developer Portal:
```
https://discord.com/developers/applications
```
Discord.js Documentation
```
https://discord.js.org/#/
```
## Bugs
CLIENT_MISSING_INTENTS
- Fix (link) is to add GatewayIntentBits to several lines
```
const { Client, GatewayIntentBits } = require('discord.js')
const sigma = new Client({ intents: [GatewayIntentBits.Guilds] });
```
Message.content is empty but everything else is there
- Fix (link) is to add GatewayIntentBits.MessageContent
```
'intents': [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildBans,
GatewayIntentBits.GuildMessages
]
```