Oceanic
Coming from Oceanic? Don't worry, we'll help you move to Dreamcord!
Specifying your token
On Oceanic, you might've specified your bot token like this:
index.js
const client = new Client({ auth: "Bot <your bot's token>" });
But on Dreamcord, you specify your bot token in the connect
function, like this:
index.js
client.connect("<your bot's token>");
This is similar to how discord.js does it.
Specifying intents
On Oceanic, you might've specified intents like this:
index.js
const client = new Client({
auth: "Bot <your bot's token>",
gateway: {
intents: ["GUILDS", "GUILD_MESSAGES"],
},
});
But on Dreamcord, you specify intents directly in the options instead of in the gateway
property, and by using PascalCase
instead of SCREAMING_SNAKE_CASE
, like this:
index.js
const client = new Client({
intents: ["Guilds", "GuildMessages"],
});
Or through the Intents
enum, like this:
index.js
// Import the `Intents` enum from dreamcord
import { Intents } from "dreamcord";
const client = new Client({
intents: [Intents.Guilds, Intents.GuildMessages],
});
Or maybe even a mix of both!
index.js
// Import the `Intents` enum from dreamcord
import { Intents } from "dreamcord";
const client = new Client({
intents: ["Guilds", Intents.GuildMessages],
});
This is similar to how discord.js does it.