Skip to content

Commit

Permalink
fix: allow modifications of settings even after setup
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 16, 2024
1 parent 0345614 commit 1e91824
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/main/typescript/services/GuildSetupService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1192,26 +1192,6 @@ class GuildSetupService extends Service implements HasEventListeners {
await this.defer(interaction);
this.resetState(guildId, id, messageId);

Check warning on line 1193 in src/main/typescript/services/GuildSetupService.ts

View check run for this annotation

Codecov / codecov/patch

src/main/typescript/services/GuildSetupService.ts#L1186-L1193

Added lines #L1186 - L1193 were not covered by tests

if (this.configManager.config[guildId]?.antispam?.enabled) {
await this.pushState(guildId, id, messageId, {
embeds: [
this.embed(["Spam Protection"], "Spam protection is already enabled!", {
color: Colors.Danger
})
],
components: [
this.selectMenu(guildId, true),
this.buttonRow(guildId, id, messageId, {
back: true,
cancel: true,
finish: false
})
]
});

return;
}

await this.pushState(guildId, id, messageId, {
embeds: [
this.embed(["Spam Protection"], "Please configure the following options.", {
Expand Down

0 comments on commit 1e91824

Please sign in to comment.