Giter VIP home page Giter VIP logo

pkck_bot's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.