-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
constants.ts
22 lines (15 loc) · 861 Bytes
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export const PACKAGES = ['brokers', 'builders', 'collection', 'core', 'proxy', 'rest', 'util', 'voice', 'ws'];
export const DESCRIPTION =
"discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.";
export const CODE_EXAMPLE = `import { Client, GatewayIntentBits } from 'discord.js';
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.on('ready', () => {
console.log(\`Logged in as \${client.user.tag}!\`);
});
client.on('interactionCreate', async (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
await client.login(TOKEN);`;