DiscordAPIError[10070]: Unknown Guild Scheduled Event
I've been working on a bot that handles Guild Scheduled Events. While implementing the GuildScheduledEventDelete event, I ran into the following error while trying to fetch the subscribers.
This is the code I have right now:
I'm not sure what the error is, any help would be much appreciated.
11 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPthe event has been deleted
there are no subscribers to fetch
Is that how it works? What does the GuildScheduledEventDelete event do then? Does it not return the scheduled event as it was right before it was deleted?
according to the dapi docs, the event uncharacteristically sends the event's data
normally this isn't the case
that being said, yes that is still how it works
a deleted resource cannot be fetched
I see, thanks for your help. Is there a way that you would suggest that I fetch the subscribers once the event is deleted without using that event? Or should I try to find a work around?
for what purpose do you need the subscribers to a deleted event?
Specifically my program uses Scheduled Events to take attendance for a club. I want to get the subscribers to log it directly onto a Google Sheets, and so for me I thought it would make sense to try and "take attendance" right at the end and then delete the event. Previously I had tracked when each person had been added, but that was a bit too resource intensive.
well if your bot is deleting the event, why not just handle this before deleting it?
I'm actually not too familiar with events, does it not automatically delete once the scheduled end time is over? I assumed it was like that so I wouldn't have my bot delete it automatically. If that is not the case then I will implement it as you say. Thanks!
I mean it does, I was going off of your phrasing "take attendance right at the end and then delete the event"
if your bot isn't what's deleting the event, you're free to set some timeout or otherwise scheduled task to attempt to do this a little before the event actually ends
though I imagine just the subscribers to the event may not necessarily reflect who actually attends
It doesn't but it gives us a rough idea on who will and we can then check in person. I will just use cron to implement the timer in that case. Thanks for your help, I really appreciate it 😀