discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.99k stars 1.26k forks source link

Expired invites does not emit InviteDelete event !! #7249

Closed SENPAY98K closed 3 weeks ago

SENPAY98K commented 3 weeks ago

Description

As title says, the invites that expires after specified time, bots does not trigger any InviteDelete event.

Steps to Reproduce

Create an invite with 30 minutes age, and wait for it to expire.

Expected Behavior

After invite expires, it will deleted from server, so the InviteDelete event should be emited.

Current Behavior

After invite expires, it is deleted from server. But the InviteDelete event did not emit.

Screenshots/Videos

No response

Client and System Information

Discordjs v14 - Windows 11 - Linux Ubuntu

jhgg commented 3 weeks ago

This isn't a bug, invite delete audit log only emitted when someone deletes an invite before it expires.

SENPAY98K commented 3 weeks ago

Well, in that case how are we supposed to be notified about expired invites ?

jhgg commented 3 weeks ago

The invite create event has an expires at field. You can use this to determine when the invite expires and act accordingly.

SENPAY98K commented 3 weeks ago

The invite create event has an expires at field. You can use this to determine when the invite expires and act accordingly.

That will be cause more hustle for large servers, but i guess it will do at the moment! Thanks for the help.