Skip to main content

Preparations

info

We expect you to already have a working installation of Deno 1.28+ or Node.js 18+

Setting up your project

Dependencies

Start by creating a deno.json file in your project directory:

{
"importMap": "import_map.json"
}

Then create an import_map.json file in the same directory:

{
"imports": {
"disploy": "npm:disploy@dev",
"std/": "https://deno.land/std@0.164.0/",
"fmt/": "https://deno.land/std@0.164.0/fmt/"
}
}

This will allow you to import Disploy from the disploy module. We are also importing the standard library from Deno's official repository.

Creating a .env

Create a .env file in your project directory and add the following content:

DISCORD_CLIENT_ID="Your Discord bot's client id"
DISCORD_TOKEN="Your Discord bot's token"
DISCORD_PUBLIC_KEY="Your Discord's bot's public key"

You can find all of these values in your Discord Developer Portal.

Public Key and Client ID Bot Token