Skip to content

StrawberryMaster/pfm-js

Repository files navigation

pfm-js

pfm-js logo

License Version Size Last Commit Code Size

A weird Discord bot, lover of cookies and banana bread. He's nice though, we promise. PFM uses the Discord.js library.

Installation

Requirements

Setting up your environment

  1. Fork this repository
  2. Then clone your forked repository to your local machine
  3. Install the dependencies with either bun install or npm install

Creating a Discord application

  1. Go to the Discord Developer Portal
  2. Click on "New Application" and give it a name
  3. Go to the "Bot" tab and click on "Add Bot"
  4. Click on "Copy" under "Token" and paste it into a file called config.json in the root of the repository. Don't share this token with anyone! It will look like this:
{
    "token": "your-token-here"
}
  1. Invite your bot to your server by going back to the General Infomration tab, and writing down the Client ID. Replace CLIENT_ID in the following URL with that number and paste it into your web browser:
    https://discord.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot
  2. Follow the on-screen instructions to invite your bot to your server

Running the bot

Simply use bun start or npm start to start the bot. If this is not working, feel free to use bun boot.ts or node boot.js instead.

Bonus: clam

Clam is the fun little tool used to clean up the log files generated by the bot @ deploy-commands.log and index.log. Easiest way to use it is to run bun clam.ts, in the root of the repository. It will clean up the logs, assuming they're not empty, and then exit.