discordrb icon indicating copy to clipboard operation
discordrb copied to clipboard

Add ScheduledEvents support

Open connorshea opened this issue 2 years ago • 3 comments

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 on Discordrb::Server to get scheduled events for the given server.
  • Add a scheduled_event method on Discordrb::Server for getting individual scheduled events.
  • Add a delete method on Discordrb::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.

connorshea avatar Apr 23 '22 23:04 connorshea

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!

b-turchyn avatar Oct 28 '22 15:10 b-turchyn

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.

kmcphillips avatar May 05 '23 18:05 kmcphillips

Up

edos4 avatar Oct 23 '23 03:10 edos4