From 810b55104a3cb72f8cc27f4a19564e4a7bcb5eaa Mon Sep 17 00:00:00 2001 From: Maurice Kevenaar Date: Tue, 14 Jun 2022 21:58:05 +0200 Subject: [PATCH] (#62) Prevent creating a role when category does not exist Fixes #62 --- src/database/reaction.role.service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/database/reaction.role.service.js b/src/database/reaction.role.service.js index 7c242781..913e5d5c 100644 --- a/src/database/reaction.role.service.js +++ b/src/database/reaction.role.service.js @@ -31,6 +31,7 @@ export class ReactionRoleService { static async create(guildId, categoryName, role, description, emoji) { let existingRole; + let existingCategory = await ReactionService.get(guildId, categoryName); try { existingRole = await this.get(guildId, categoryName, role.id);