Files
discordeno/website/docs/getting-started.md
Fleny ca9f4fec10 docs: Include notice of strictNullChecks being required (#4267)
And also update deno example to use v21
2025-07-28 08:21:51 +02:00

1.8 KiB

sidebar_position, sidebar_label
sidebar_position sidebar_label
3 Getting started

Getting started with Discordeno

:::info Discordeno is not intended for beginners, however you can still utilize it. :::

Installation

npm install discordeno # Using npm

If you need more specific packages, you can install them directly for example:

npm install @discordeno/types # Using npm

Typescript

If you are using Typescript you do need to enable strictNullChecks in your TSConfig, or else it may cause issues especially with Desired Properties

Understanding Bot Helpers

Whenever you want to do something on discord, you will need to talk to the discord api. To make this easy, we provide "helpers". For example, to send a message to a channel, you can call the bot.helpers.sendMessage method with the 2 required parameters:

  • The ID of the channel that you want to send the message to
  • The options of your message
const message = await bot.helpers.sendMessage(channel.id, {
  content: 'Hello world. This is test message from Discordeno.',
})

Understanding Desired Properties in Discordeno

By default, discordeno requires you to opt into each property on discord objects. For example, a channel object by default will be {}. If you want details in that channel you must enable those properties as desired properties.

For more details checkout the desired properties docs

:::tip If you plan to use discordeno, this is a must read! Please do not skip! It is a very important concept to make your bot work in discordeno. :::

Minimal bot that logs into Discord

You can check minimal examples with Node.JS, Deno or Bun.