Getting Started
Make a simple Discord bot that logs into the Discord gateway in just a few steps!
Requirements:
- A Discord account
- A Discord bot application
- Node.js
- Some knowledge of JavaScript
- Install the package:
- npm
- Yarn
- pnpm
npm install dreamcord
yarn add dreamcord
pnpm add dreamcord
- Add some code for a basic bot:
index.js
import { Client, Intents } from "dreamcord";
const client = new Client({
intents: Intents.Guilds,
});
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}.`);
});
client.connect("<insert your bot's token>");
- Run the file:
# If you named the bot file something else,
# replace "index.js" with your own name.
node index.js
- Success! Now your bot should be online on Discord. If it isn't, contact us on Discord or make an issue on GitHub!