Skip to content

MatricalDefunkt/Confessions-Bot

Repository files navigation

Confessions-Bot

This bot is actually a custom Discord bot made for a server called PYL: Discord server invite

To use this bot, download the source code, create a bot application on Discord, and follow these steps;

Create A Discord Bot Application

Go here to create a new discord bot. You can find many tutorials online on how to create and invite a bot. Follow any one of them and invite it to your server. Please note that it needs the appication.commands scope to function.

Setting It Up

Now, you can use a console and file explorer, but I'd recommend a code editor, personally, VS Code.

In the file explorer, create a new folder, wherever you'd like, calling it anything you'd like. Move all your downloaded files here.

Next, go here to download NodeJS. It's essential. Install it.

If you're using VS Code, right click on the folder, and click on Open with Code. Once it's open, your screen should look like this:

ConfessionsBotTutorial1

Now, go to View (Top-Left). Click on it, and click on Terminal, or if you are using the file explorer, open a new instance of a console (command prompt, powershell etc.) and navigate to this folder.

Now, in the console/terminal, paste the following command, and press enter

npm install

Create a config.JSON

We're in the final yard now!

FOR CODE-EDITOR USERS:

Now right click in the empty space in the explorer, as shown.

ConfessionsBotTutorial2

Click on New File and name it config.json. Paste this in the file:

{
    "token": "DISCORD BOT TOKEN",
    "guildId": "SERVER ID",
    "clientId": "BOT CLIENT / APPLICATION ID",
    "confessId": "CONFESSION CHANNEL ID",
    "errChannelId": "ERROR CHANNEL ID",
    "errGuildId": "ERROR GUILD ID",
    "staffRoleId": "STAFF ROLE ID",
    "logChannelId": "LOG CHANNEL ID"
}

Now, paste all of the data we had obtained earlier in the appropriate fields.

FOR FILE-EXPLORER USERS:

Create a new file, naming it config.txt. Open the file using notepad and paste the following code into it:

{
    "token": "DISCORD BOT TOKEN",
    "guildId": "SERVER ID",
    "clientId": "BOT CLIENT / APPLICATION ID",
    "confessId": "CONFESSION CHANNEL ID",
    "errChannelId": "ERROR CHANNEL ID",
    "errGuildId": "ERROR GUILD ID",
    "staffRoleId": "STAFF ROLE ID",
    "logChannelId": "LOG CHANNEL ID"
}

Once done, exit out, and rename the file to config.json. Your OS will most probably point out that you are doing something dangerous, but please ignore it, as, in this case, it is not a dangerous action.

Creating the Database and Registering Commands

Once you've made sure everything is in place, paste these three lines into the console.

node deployl.js
node ./database/database

Your explorer should look something like this:

ConfessionsBotTutorial3 1 ConfessionsBotTutorial3 2

Running the Bot

Lastly, (this is where you run the bot), type node . into the shell. If everything is okay, you should see Ready! there.

You can now run all the commands and try them out for yourself! Good luck!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published