Skip to content

Commit

Permalink
fix: state corruption in guild setup service
Browse files Browse the repository at this point in the history
Signed-off-by: Ar Rakin <rakinar2@onesoftnet.eu.org>
  • Loading branch information
virtual-designer committed Oct 5, 2024
1 parent ab17147 commit 62e3bac
Show file tree
Hide file tree
Showing 3 changed files with 241 additions and 83 deletions.
3 changes: 2 additions & 1 deletion src/main/typescript/commands/settings/SetupCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class SetupCommand extends Command<ContextType> {
await this.application.service("guildSetupService").initialize(
commandMessage as ChatInputCommandInteraction & {
guild: Guild;
}
},
context.user.id
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class GuildCreateEventListener extends EventListener<Events.GuildCreate, Client>
return;
}

await this.guildSetupService.initialize(member).catch(this.logger.error);
await this.guildSetupService.initialize(member, member.id).catch(this.logger.error);

Check warning on line 77 in src/main/typescript/events/guild/GuildCreateEventListener.ts

View check run for this annotation

Codecov / codecov/patch

src/main/typescript/events/guild/GuildCreateEventListener.ts#L62-L77

Added lines #L62 - L77 were not covered by tests
}
}

Expand Down
Loading

0 comments on commit 62e3bac

Please sign in to comment.