Description
Poddy is the Discord Bot I’ve created for the RunPod Discord server to automate or ease certain tasks.
Key Features
Poddy includes several key features that are ever-changing.
- Poddy features a very in-depth help desk system to allow team members of the team managing the Discord to create and manage help desks within the Discord on the fly.
- This help desk feature will allow us to answer frequently asked questions as seamlessly as possible.
- This help desk feature fully utilizes Discord’s interaction system utilizing application commands, select menus, buttons, and modals.
- As features are added/requested, functionality will likely be added to this help desk system. For example, for the ZenDesk integration I’ll likely have to add a way to allow users to add button links to the embed responses so we can force users to authenticate.
- The help desk system above also utilizes Poddy’s embed feature. Discord has an in depth embed system, with Poddy you’re now able to create, send, and utilize embeds dynamically.
- This system powers several other features within Poddy, as well as allows us to send information dense messages across the server while maintaining a clean message.
- Poddy features an invite management system to create and track the usage of an invite, this allows us to track the success of different experiments or marketing efforts if we use a new invite for each experiment.
- Poddy also has a fully autonomous system event system for certain types of events such as image or video contests.
- This system allows us to continue running community events within the Discord whenever we are pre-occupied with other tasks (our first fully automated event was run by itself while I was on vacation in early May).
- We can reward users for their participation in these events with $x amount of credits (These credits are taken out of my account and logged into a Discord channel).
- The user who redeemed a code, the code that was generated, how much it’s worth, the email they used for the code, what event the code was for, when their Discord account was created, and when they joined our Discord server.
- This also features an anonymous community voting system for users to vote on who should win an event.
- When we were previously using Discord internally I had created a subscription system for notifications, more specifically notifications for user groups in HubSpot, that code still exists in the repository but is unused now.
- This subscription group system would allow our sales team to r each out to specific user groups within HubSpot such as users who are churning within different spend brackets.
- When we moved to Slack I converted this system to listen to Zapier webhooks for notifications and to send out all notifications daily on a cron schedule instead of spamming them throughout the day.
- In the early days of Poddy we had a couple of ideas such as automatically creating threads on messages in the introduction channel so the community would be more inclined to engage with new users, as well as automatically assigning forum channel tags on new forum channel posts. The code for both of these ideas is still in the code base and fully functional, however it is not currently used.
Technology
- Poddy is written in TypeScript and does use some type magic for a great auto completion experience.
- I opted to use the core libraries of discord.js (
@discordjs/core
, @discordjs/rest
, and @discordjs/ws
as it would give me full control of how the bot works and interacts with Discord’s API.
- discord.js is the most popular framework to build Discord bots with, using the core libraries allows us to manage our own cache and create functionality different from discord.js.
- I use Prisma to connect to a PostgreSQL database (This data is not and will not be synced to Snowflake as it does not have any important data that should be persisted).
- Poddy exposes a web server built using Hono to handle authenticated external HTTP requests (for the subscription and Zapier systems).
- Poddy also has full support for internationalization (pending translations) using
i18next
.
How Stuff Works
- Poddy connects to Discord’s Gateway using
@djs/ws
, this lets us receive events and interactions from Discord, we respond to these with @djs/rest
.
- Poddy’s library is very object oriented, ranging from it’s client (
ExtendedClient.ts
) to it’s commands system (ApplicationCommand.ts
, TextCommand.ts
, etc.).