Fix edge case where join embed is not generated if invite was single use #305

Merged
Sirdog merged 1 commit from bug/join-log-fail into dev 2026-05-03 02:52:12 -04:00
Owner

A simple little error discovered by #298.

The Invite to Server option in Discord's DM generates a single use invite. Most invites generated last 7 or so days. EnduraBot's code was reliant on the invite existing both before and after the user joined. If this wasn't the case, it would not send an embed and throw the error in the aforementioned issue.

This PR addresses that by treating an invite existing in the past, but no longer existing after a user joins, as it being a successful match to the incoming user.

Closes #298

A simple little error discovered by #298. The `Invite to Server` option in Discord's DM generates a single use invite. Most invites generated last 7 or so days. EnduraBot's code was reliant on the invite existing both before and after the user joined. If this wasn't the case, it would not send an embed and throw the error in the aforementioned issue. This PR addresses that by treating an invite existing in the past, but no longer existing after a user joins, as it being a successful match to the incoming user. Closes #298
Sirdog self-assigned this 2026-05-03 02:52:07 -04:00
Sirdog deleted branch bug/join-log-fail 2026-05-03 02:52:12 -04:00
Sign in to join this conversation.
No description provided.