936 B
936 B
order, meta
| order | meta | ||||
|---|---|---|---|---|---|
| 0 |
|
Getting Started
This guide assumes some familiarity with JavaScript, React, Discord.js and the Discord API. Keep these pages as reference if you need it.
Note: Ensure your project has support for running code with JSX. I recommend using esno.
Install
# npm
npm install reacord react discord.js
# yarn
yarn add reacord react discord.js
# pnpm
pnpm add reacord react discord.js
Setup
Create a Discord.js client and a Reacord instance:
// main.js
import { Client } from "discord.js"
import { ReacordDiscordJs } from "reacord"
const client = new Client()
const reacord = new ReacordDiscordJs(client)
client.on("ready", () => {
console.log("Ready!")
})
await client.login(process.env.BOT_TOKEN)