mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix: don't fetch partial messages on delete
This commit is contained in:
parent
813beb44a0
commit
0fa45e3e50
@ -10,15 +10,10 @@ module.exports = class extends Listener {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("discord.js").Message} oldMessage
|
||||
* @param {import("discord.js").Message} message
|
||||
*/
|
||||
async run(message) {
|
||||
/** @type {import("client")} */
|
||||
const client = this.client;
|
||||
|
||||
if (message.partial) message.fetch().then(m => (message = m)).catch(client.log.error);
|
||||
const ticket = await client.prisma.ticket.findUnique({
|
||||
include: { guild: true },
|
||||
where: { id: message.channel.id },
|
||||
|
Loading…
Reference in New Issue
Block a user