Skip to content

KrammyGod/pingbot

Repository files navigation

pingbot - A multi-purpose Discord Bot

Support Server

A multipurpose Discord Bot. Made with Discord.JS, TypeScript, and PostgreSQL. There are other services for some of the bot's features, such as Twitter Scraper or AWS CDN Origin Server which are also hosted personally and used internally.

Invite me!

Features

  • Anime Commands
    • Currency system that allows you to collect anime characters
    • Collect currency by using /daily, generate characters using /multi.
    • Submit new characters using /submit
      • Includes an under-the-hood implementation of a scraper that is capable of scraping images from X (formerly Twitter), Pixiv, and Danbooru.
  • Music commands
    • Play music from YouTube, Spotify, SoundCloud, and more to come!
    • Advanced queue system with support for skipping and removing songs, and playing on repeats.
  • Miscellaneous commands
    • Hoyolab autocollector
    • Poll command
  • Fully featured help command
  • Moderation (in progress)
  • ...and more!

Technical Details:

Prior to formal education on databases, the schema for the Postgres instance was extremely messy (can be viewed here). As such, there is a migration script to move to the new and improved schema.

This specific bot is hosted on a personal Orange Pi 5, and to lessen the burden on its processor, there is a workflow that transpiles the TypeScript files into JavaScript files, and then uploads them to a different branch, dist. The same workflow uses pm2, and the configuration file to automatically deploy the latest version.

package.json scripts

  • collect:game - Runs the autocollector for the specified game
  • reset - Runs the daily reset for daily rotating commands like /daily
  • cookie - Tests the hoyolab cookie to see if it is still valid
  • download - Downloads the waifus into files/waifus.txt
  • upload - Uploads files/waifus.txt into database
  • dev - Starts the bot in development mode, using nodemon
  • lint - Lints the source code
  • lint:fix - Runs eslint with fix option
  • build - Transpiles the source code
  • deploy - Transpiles the source code and registers slash commands
  • start - Transpiles the source code and starts the bot

More details will be added as the project progresses when necessary.

About

A multi-purpose Discord Bot written in TypeScript

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •