-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ScheduledEvents support #152
base: main
Are you sure you want to change the base?
Add ScheduledEvents support #152
Conversation
This includes a few convenience methods and all the necessary attributes for the class based on what the API returns for scheduled events.
It's events all the way down. Also a method on the Server class for getting scheduled events for a guild.
For getting a list of scheduled events off of a given guild.
Pretty basic implementation. Also renamed the create handler to match the other guild-based event handlers.
Added endpoints for Show/Create/Update/Delete.
Now we can use event listeners to track when a user is added or removed from a scheduled event.
This allows bots to request access for scheduled event creation, deletion, etc events.
Need to figure out how to handle these properly, for now it's just TODOs.
Also fix the event handlers. I wasn't defining the `matches?` method correctly.
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 #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 |
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:
handle_dispatch
so the event handlers actually get triggered.Added
Discordrb::ScheduledEvent
class to represent Discord's Scheduled Events functionalityscheduled_events
method onDiscordrb::Server
to get scheduled events for the given server.scheduled_event
method onDiscordrb::Server
for getting individual scheduled events.delete
method onDiscordrb::ScheduledEvent
to delete the ScheduledEvent.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.