mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-22 15:53:08 +02:00
fix: stale notification pinging staff instead of creator (closes #459)
This commit is contained in:
parent
8fd8c45cd2
commit
59a6358b37
@ -153,7 +153,7 @@ module.exports = class extends Listener {
|
|||||||
if (messages.size > 0) {
|
if (messages.size > 0) {
|
||||||
const lastMessage = messages.first();
|
const lastMessage = messages.first();
|
||||||
const staff = await isStaff(channel.guild, lastMessage.author.id);
|
const staff = await isStaff(channel.guild, lastMessage.author.id);
|
||||||
if (staff) ping = lastMessage.author.toString();
|
if (staff) ping = `<@${ticket.createdById}>`;
|
||||||
else ping = ticket.category.pingRoles.map(r => `<@&${r}>`).join(' ');
|
else ping = ticket.category.pingRoles.map(r => `<@&${r}>`).join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user