From 736cf2f6bf4a0c76fc1c67276d199e53cac34d2a Mon Sep 17 00:00:00 2001 From: chimpdev Date: Fri, 29 Mar 2024 11:13:51 +0300 Subject: [PATCH] Refactor interaction object properties --- server/src/bot/events/interactionCreate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/bot/events/interactionCreate.js b/server/src/bot/events/interactionCreate.js index 81b0d267..0e6c4880 100644 --- a/server/src/bot/events/interactionCreate.js +++ b/server/src/bot/events/interactionCreate.js @@ -45,8 +45,8 @@ module.exports = async interaction => { const member = await guild.members.fetch(interaction.user.id).catch(() => null); if (!member) return interaction.reply({ content: 'You are no longer in this server.' }); - interaction.guild = guild; - interaction.member = member; + Object.defineProperty(interaction, 'guild', { value: guild }); + Object.defineProperty(interaction, 'member', { value: member }); require('@/src/bot/commands/vote').execute(interaction); }