discordrb
discordrb copied to clipboard
Add ScheduledEvents support
Summary
I think I've got most of this working now, and I've tested it with my own bot. The only thing that isn't working is the event handlers, because I didn't add them to handle_dispatch
. I might need some help on that part.
TODO:
- Finish the relevant event handling to
handle_dispatch
so the event handlers actually get triggered.
Added
-
Discordrb::ScheduledEvent
class to represent Discord's Scheduled Events functionality - Add a
scheduled_events
method onDiscordrb::Server
to get scheduled events for the given server. - Add a
scheduled_event
method onDiscordrb::Server
for getting individual scheduled events. - Add a
delete
method onDiscordrb::ScheduledEvent
to delete the ScheduledEvent. - Add request methods to
Discordrb::API::Server
for creating, updating, and deleting scheduled events. These aren't exposed on the Discordrb::Server class right now, but you can use the "raw" endpoints if you really want to. - Add event handling for ScheduledEvent creation, updating, and deleting.
- Add event handling for users being added and removed to ScheduledEvents.
- Add support for the ScheduledEvent intents.
Hey @connorshea; was this something you were still working on? I have a use case for what you've built here. Not sure if I can be of any help, but I'm happy to get my hands dirty if you'd like!
Interested if anyone is going to pick this up? Is it close? I can look at it if nobody is owning it but it's lots of context to pickup if someone already has the context. Looks unfinished in https://github.com/shardlab/discordrb/issues/183
I'm using the REST api with the bot token for now, if anyone has the same requirements as me, but it's messy and not well integrated.
Up