Mirror of the GitHub repository for the YAGPDB Discord bot.
Go to file
2024-06-29 14:23:17 +05:30
.circleci bumped all dependencies to latest versions (#1530) 2023-07-13 18:58:38 +05:30
.github/workflows A lot of minor fixes. (#1125) 2022-02-24 07:30:32 +05:30
.vscode added debug config for docker and local, to make it easier to debug yagpdb (#1630) 2024-04-10 00:37:34 +05:30
admin Update package imports to V2 (#1195) 2022-05-05 14:49:47 +05:30
analytics Update package imports to V2 (#1195) 2022-05-05 14:49:47 +05:30
antiphishing Add nsfw flag and marked some commands as nsfw. (#1371) 2022-11-19 20:11:51 +05:30
automod more fixes 2024-06-29 13:47:03 +05:30
automod_legacy Revert "templates: block nested template executors (#1677)" 2024-06-28 21:24:49 +05:30
autorole autorole: add option to ignore bots (#1548) 2023-08-13 14:04:41 +05:30
bot fixes to warnings, notifications, moderation config, paginated messages, poll 2024-06-29 12:04:34 +05:30
cah Handled error for failure to start trivia, fixed never ending interaction response for cah create 2024-01-09 20:53:21 +05:30
cmd Fix typo in sampleenvfile (#1614) 2024-02-23 09:36:50 +05:30
commands Revert "templates: block nested template executors (#1677)" 2024-06-28 21:24:49 +05:30
common Revert "templates: block nested template executors (#1677)" 2024-06-28 21:24:49 +05:30
customcommands Revert "templates: block nested template executors (#1677)" 2024-06-28 21:24:49 +05:30
discordlogger Update package imports to V2 (#1195) 2022-05-05 14:49:47 +05:30
feeds Update package imports to V2 (#1195) 2022-05-05 14:49:47 +05:30
frontend change scope from const to var for global variables in cc edit page, and remove console logs 2024-06-16 18:28:51 +05:30
lib cc/threads: fix a few more bugs (#1685) 2024-06-27 17:31:08 +05:30
logs paginatedmessages: interoperate with response autodeletion setting (#1671) 2024-06-27 17:31:07 +05:30
moderation don't check audit log if fetching it fails 2024-06-29 14:23:17 +05:30
notifications more fixes 2024-06-29 13:47:03 +05:30
premium Update premium.html (#1673) 2024-06-27 17:31:07 +05:30
reddit Bump SQLBoiler 3 based models to SQLBoiler 4 (#1631) 2024-04-10 17:29:05 +05:30
reminders reminders: verify that member can run remindme in target channel (#1674) 2024-06-27 17:31:08 +05:30
reputation paginatedmessages: interoperate with response autodeletion setting (#1671) 2024-06-27 17:31:07 +05:30
rolecommands all: futureproof viewperms and template Permissions map by autogenerating perm name to bit map (#1649) 2024-05-30 11:24:25 +05:30
rsvp all: futureproof viewperms and template Permissions map by autogenerating perm name to bit map (#1649) 2024-05-30 11:24:25 +05:30
safebrowsing Update package imports to V2 (#1195) 2022-05-05 14:49:47 +05:30
serverstats Bump SQLBoiler 3 based models to SQLBoiler 4 (#1631) 2024-04-10 17:29:05 +05:30
soundboard This is prime branch for all GORM TO SQLBOILER migrations. (#1655) 2024-06-27 17:31:07 +05:30
stdcommands fixes to warnings, notifications, moderation config, paginated messages, poll 2024-06-29 12:04:34 +05:30
streaming Added channel to template context defaulting to AnnounceChannel (#1610) 2024-01-30 23:16:31 +05:30
tickets Revert "templates: block nested template executors (#1677)" 2024-06-28 21:24:49 +05:30
timezonecompanion paginatedmessages: interoperate with response autodeletion setting (#1671) 2024-06-27 17:31:07 +05:30
trivia fixed incorrect log 2024-01-10 12:37:08 +05:30
twitter Bump SQLBoiler 3 based models to SQLBoiler 4 (#1631) 2024-04-10 17:29:05 +05:30
verification Revert "templates: block nested template executors (#1677)" 2024-06-28 21:24:49 +05:30
web This is prime branch for all GORM TO SQLBOILER migrations. (#1655) 2024-06-27 17:31:07 +05:30
yagpdb_docker added debug config for docker and local, to make it easier to debug yagpdb (#1630) 2024-04-10 00:37:34 +05:30
youtube more fixes 2024-06-29 13:47:03 +05:30
.gitattributes fixes 2021-10-07 10:53:20 +05:30
.gitignore Clean up on warnings on cah packs (#1633) 2024-04-13 14:02:50 +05:30
breaking_changes.md Update redis requirements in readme, update autorole full scan text description, update breaking_changes (#1181) 2022-04-19 16:05:07 +05:30
CONTRIBUTING.md meta/contrib: improve contributing guidelines (#1538) 2023-07-17 16:10:51 +05:30
go.mod fixes to warnings, notifications, moderation config, paginated messages, poll 2024-06-29 12:04:34 +05:30
go.sum fixes to warnings, notifications, moderation config, paginated messages, poll 2024-06-29 12:04:34 +05:30
info.html update some info (#526) 2019-10-06 16:50:55 +02:00
LICENSE Update license (#444) 2019-05-06 14:04:58 +02:00
README.md readme: bump Go version req to ^1.20 (#1565) 2023-08-31 10:24:22 +05:30
SUGGESTION_TEMPLATE.md Update SUGGESTION_TEMPLATE.md (#453) 2019-05-26 22:04:31 +02:00

YAGPDB - Yet Another General Purpose Discord Bot

YAGPDB is a multifunctional, modular Discord bot. It is modular in the sense that for most things plugins exist -- However, some plugins may depend on other plugins.

Plugins

  • YouTube Feed
  • Stream Announcements
  • Server Stats
  • Soundboard
  • Reputation
  • Reminders
  • Reddit Feed
  • Notifications
  • Moderation
  • Logs
  • Custom Commands
  • And More!

Selfhosting

There are two ways of selfhosting this bot: standalone, or dockerized.

General Bot Setup

Directions on creating an app and getting credentials may be found here.

YAGPDB does not require you to authorize the bot: all of that will be handled via the Control Panel.

In addition, you will need to add the following urls to the bot's "REDIRECT URI(S)" configuration:

Hosting Dockerized

If you have docker-compose installed, that might be the fastest route of getting the bot up and running:

git clone https://github.com/botlabs-gg/yagpdb
cp yagpdb/yagpdb_docker/{app.example.env,app.env}
cp yagpdb/yagpdb_docker/{db.example.env,db.env}

Edit both env files accordingly. Make sure ports 80 and 443 are accessible on your network and that you have a proper image in docker-compose.yml:

docker-compose -f yagpdb/yagpdb_docker/docker-compose.yml up

Alternatively, you can run the bot behind a proxy:

docker network create proxy-tier
docker-compose -p proxy yagpdb/yagpdb_docker/docker-compose.proxy.yml up
docker-compose -f yagpdb/yagpdb_docker/docker-compose.proxied.yml up

During development, use the docker-compose.dev.yml file:

docker-compose -f yagpdb/yagpdb_docker/docker-compose.dev.yml up

Hosting Standalone

Requirements

  • Golang 1.20 or above
  • PostgreSQL 9.6 or later
  • Redis version 5.x or later

Setting Up

Configure Redis and Postgres with your desired settings.

In postgres, create a new user yagpdb and database yagpdb and grant that user access to that database.

Set up the environment variables with the credentials from the general setup. See the sample env file for a list of all enviroment variables.

Afterwards, run the build script located at /cmd/yagpdb/build.sh and start the bot using ./yagpdb:

git clone https://github.com/botlabs-gg/yagpdb
cd yagpdb/cmd/yagpdb
sh build.sh
./yagpdb -all

See ./yagpdb -help for all usable run flags. The webserver listens by default on ports 5000 (HTTP) and 5001 (HTTPS).

Databases

YAGPDB uses Redis for light data and caching, and postgresql for most configurations and heavy data, such as logs.

Updating

Updating with v1 and higher should migrate schemas automatically, but you should always make backups.

Breaking changes can be found in breaking_changes.md, which should always be consulted before updating.

Contributing

Please view the contributing guidelines before submitting any contributions.

See bot/plugin for info about bot plugins, web/plugin for web plugins and feeds/plugin for feeds if you wanna make a new fully fledged plugin.

Expect web, bot and feed instances to be run separately.

For basic utility/fun commands, you can just jam them in stdcommands. Use the existing commands there as an example of how to add one.

Please check CONTRIBUTING.md for further details.