Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 1.98 KB

INSTALL.md

File metadata and controls

79 lines (56 loc) · 1.98 KB

This is a bot is using Node.js & Discord.js

Prerequisites

  • Node.js (versions 18 or higher)
  • Discord.js 14
  • Discord
  • Npm

Getting Started

  • Creating a Discord Developer account and add a bot. (Read the Discord Develeoper Docs for how to set up a bot: Discord Developer Docs

Fork/clone the repository, install its dependencies:

git clone https://github.com/LinkTheCoder/Pengu.git

.env

Add a .env to the root of the project. This is to store ID's and API Keys you will need to connect your bot to Discord.

{
CLIENT_ID=. . .
GUILD_ID=. . .
TOKEN=. . .
TENOR_KEY=. . .
YOUTUBE_KEY=. . .
}

Run Bot

npm start

Commands

Commands are stored in the commands Folder. Push updated commands to Discord:

npm run deploy

Youtube

To be able to fetch videos from Youtube you will need a YouTube API key. You can read more on Youtube Developers doc Youtube Data API

You will also need to add a file to the root called lastFetchedVideo.txt

This is to store Youtube video ID's to prevent fetching same video multipel times.

Tenor

To access Tenor you will as well need a API key. You can read more on Tenor Developers doc Tenor API

User Data

To use the command world-penguin-day you will need to store user data. Create a file with a empty array in root called user.json

The file will store the users Discord ID and add true or false to send DM.

An example of a file with data:

{
  "351263861103394817": {
    "receiveDMs": true
  }
}

.gitignore

Remember to gitignore file you don't want other to access and/or upload the files to a server/database.

Hosting

You can self-host locally on your PC or get a mini PC (Raspberry Pi etc).

Or you could use cloud services that specialize on discord bot hosting like Sparkedhost.