From 89d85896fb09b91f44d19a304c103c01fc1f7468 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 14 Aug 2024 11:33:49 +1000 Subject: [PATCH] Find the webhook embed using the client instead of interaction --- Dockerfile | 2 +- src/commands/mp.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1fbe5e1..be66f79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,4 @@ COPY .yarn/patches .yarn/patches COPY tsconfig.json package.json yarn.lock .yarnrc.yml ./ RUN yarn -CMD yarn node . +CMD [ "yarn", "node", "." ] diff --git a/src/commands/mp.ts b/src/commands/mp.ts index 65b1941..716668a 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -191,7 +191,7 @@ export default class MP { if (client.config.dcServer.id === interaction.guildId) { if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmod'); } - const suggestionPool = await (interaction.guild.channels.cache.get(client.config.dcServer.channels.mpmod_chat) as Discord.TextChannel).messages.fetch(MPChannels.modChat); + const suggestionPool = await (client.guilds.cache.get(client.config.dcServer.id).channels.cache.get(client.config.dcServer.channels.mpmod_chat) as Discord.TextChannel).messages.fetch(MPChannels.modChat); interaction.reply({embeds: [suggestionPool.embeds[0]]}); }, // Server management group create_server: async()=>{