/pkck_bot

Discord bot, currently just with Watch2Gether Link creation and MindFactory tracking

Primary LanguageJavaScript

Discord Bot to test my coding skills

Disclaimer: This is early phase software and could have major quality issues.

This is a Discord Bot using discord.js to create Watch2Gether Rooms and notifiys users when a desired product is listed for sale (only MindFactory atm).

Example images

image

Whats new in the latest comit

  • added possibility to get notified, when a product in the shop of a german retailer gets listed at the "SALE"-Part of the Shop (via rss)
  • improved overall project structure
  • u now need a postgre DB in order to run the full functionality of the bot

image image image


Needed modules

Install all modules via

npm i
  • discord.js
  • node-cron
  • node-fetch
  • fs
  • rss-parser
  • @discordjs/builders
  • @discordjs/rest
  • discord-api-types/v9
  • node-postgres

I might have missed a package. Remember: This is early phase software.

Note: node-postgres install command ist npm install pg

Changes to the config you need to do

If u want to use this project, make sure to get the following 4 things and enter them into the config.json, w2g.json and db_config.json.

w2g.json

apiKey -> https://community.w2g.tv/t/watch2gether-api-documentation/133767

config.json

token -> Get it from the Discord Dev page clientId -> Get it from the Discord Dev page guildId -> enable developer mode in Discord via settings, rightclick the server and click "copy Id"

db_config.json

Enter ur credentials in the specific fields. Every field is necessary!

Note

You could also change the code to "global slash commands"

Create new commands

To create new commands u just need to create a new Module in "Commands". The eventhandler is automaticly calling it, when ist command is getting used. Same for buttons. Look out for labeling misstakes. Run "deploy-commands" after u created new commands. Global commands may take up to 1h to register.

Other things i suggest for you to do

  • create service file for the bot
  • call the deploy-commands.js file, so the commands will be suggested in Discord.