Installation

Install the discord bot using the command line interface or custom installation using git

Command Line Installation

You can easily install crypton using command line:

$ npm install --global cryptonbot

Then you can set your preferred configurations using:

$ crypton config

If crypton config doesn't works try npx crypton config

Now to run the bot you can use:

$ crypton run

If crypton run doesn't works try npx crypton run

Manual Installation

You can use git to get the repository:

$ git clone https://github.com/CryptonDevelopers/Crypton.git

This make a directory called Crypton so you don't need to run it in a new directory

Move into the directory:

$ cd Crypton

Install all dependencies

$ npm install

Make a new file called .env to store environment variables and copy the contents of .env_example, Now your .env file should look like this:

.env
TOKEN="your bot token"
PREFIX="your bot prefix"
MONGO_CONNECTION_URL="mongo db compass url"
SPOTIFY_CLIENT_ID="Your_Spotify_Client_id"
SPOTIFY_CLIENT_SECRET="Your_Spotify_Client_Secret"

Now you need to edit the file with the preferred values, you can use your preferred text editor for it, you can find the details for it here:

Now run the bot using:

$ npm start

ENV Configuration

TOKEN

You can find your bot token at discord developer portal, and place it as:

TOKEN="YOUR TOKEN HERE"

PREFIX

Prefix will be what your bot will listen to commands for:

PREFIX="YOUR PREFIX HERE"

MONGO_CONNECTION_URL

You need a MongoDB Shell URL to connect to your database, if you don't need or want one, you can have the keyword NONE inside it

MONGO_CONNECTION_URL="URL OR NONE"

SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET

You can easily get your SPOTIFY CLIENT ID and SPOTIFY CLIENT SECRET here.

SPOTIFY_CLIENT_ID="ID HERE"
SPOTIFY_CLIENT_SECRET="SECRET HERE"

Last updated

Was this helpful?