Files
reacord/packages/docs/app/routes/guides/getting-started.md
2022-01-09 17:36:42 -06:00

936 B

order, meta
order meta
0
title description
Getting Started Learn how to get started with Reacord.

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)