mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-02-23 18:51:29 +02:00
feat: specific message for permission errors
This commit is contained in:
parent
8f46e5ba2c
commit
f622cfe448
@ -398,6 +398,14 @@ misc:
|
|||||||
not_ticket:
|
not_ticket:
|
||||||
description: You can only use this command in tickets.
|
description: You can only use this command in tickets.
|
||||||
title: ❌ This isn't a ticket channel
|
title: ❌ This isn't a ticket channel
|
||||||
|
permissions_error:
|
||||||
|
description: Sorry, the operation failed due to insufficient permissions.
|
||||||
|
fields:
|
||||||
|
for_admins:
|
||||||
|
name: For server administrators
|
||||||
|
value: >
|
||||||
|
[Click here]({url}) for resolution instructions.
|
||||||
|
title: ⚠️ Something went wrong
|
||||||
ratelimited:
|
ratelimited:
|
||||||
description: Try again in a few seconds.
|
description: Try again in a few seconds.
|
||||||
title: 🐢 Please slow down
|
title: 🐢 Please slow down
|
||||||
|
@ -59,6 +59,19 @@ module.exports.handleInteractionError = async event => {
|
|||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
} else if (/Missing Permissions/.test(error.message)) {
|
||||||
|
data.embeds.push(
|
||||||
|
new EmbedBuilder()
|
||||||
|
.setColor('Orange')
|
||||||
|
.setTitle(getMessage('misc.permissions_error.title'))
|
||||||
|
.setDescription(getMessage('misc.permissions_error.description'))
|
||||||
|
.addFields([
|
||||||
|
{
|
||||||
|
name: getMessage('misc.permissions_error.fields.for_admins.name'),
|
||||||
|
value: getMessage('misc.permissions_error.fields.for_admins.value', { url: 'https://discordtickets.app/self-hosting/troubleshooting/#missing-permissions' }),
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
data.embeds.push(
|
data.embeds.push(
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user