Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: check if roles exist in guild
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Feb 24, 2024
1 parent aa4ec56 commit eabf974
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class GuildCreateListener extends Listener {
}
});

if (stateRoles) {
if (stateRoles && payload.data.d.roles.length > 0) {
for (const role of payload.data.d.roles) {
// @ts-expect-error Intended to avoid .map
role.guildId = payload.data.d.id;
Expand Down

0 comments on commit eabf974

Please sign in to comment.