mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
* feat: add @discordjs/formatters * chore: make requested changes * chore: make requested changes * chore: fix other places * chore: make requested changes Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
34 lines
888 B
TypeScript
34 lines
888 B
TypeScript
export const PACKAGES = [
|
|
'brokers',
|
|
'builders',
|
|
'collection',
|
|
'core',
|
|
'formatters',
|
|
'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);`;
|