Skip to content

Commit

Permalink
[PATCH] Activate error postings
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso committed Dec 31, 2023
1 parent d6bef7c commit 5505613
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/BaseClient/ClientHelperModules/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import DataBase from '../DataBase.js';
import objectEmotes from './emotes.js';
import getLanguage from './getLanguage.js';
import constants from '../Other/constants.js';
import * as CT from '../../Typings/Typings.js';

/**
* Sends an error message to the configured error channel of the guild.
Expand Down Expand Up @@ -32,7 +33,7 @@ export default async (guild: Discord.Guild, err: Error) => {
process.env.debugWebhookToken ?? '',
);

webhook.send({
const payload: CT.UsualMessagePayload = {
embeds: [
{
color: 0xff0000,
Expand All @@ -54,5 +55,20 @@ export default async (guild: Discord.Guild, err: Error) => {
url: constants.standard.support,
},
],
});
components: [
{
type: Discord.ComponentType.ActionRow,
components: [
{
type: Discord.ComponentType.Button,
style: Discord.ButtonStyle.Link,
label: language.slashCommands.help.clickMe,
url: constants.standard.support,
},
],
},
],
};

webhook.send(payload);
};

0 comments on commit 5505613

Please sign in to comment.