Skip to content
Snippets Groups Projects
Commit df20b028 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

probably better now

parent ead48789
Branches
No related tags found
No related merge requests found
...@@ -461,7 +461,7 @@ function verifyMcChatWebhook(){ ...@@ -461,7 +461,7 @@ function verifyMcChatWebhook(){
console.log("['" + 'INFO'.yellow + "] Le Webhook du serveur MC est déjà configuré."); console.log("['" + 'INFO'.yellow + "] Le Webhook du serveur MC est déjà configuré.");
let mcChatWebhookToken = botSettings.findOne({ where: { name: "mcChatWebhookToken" } }); let mcChatWebhookToken = botSettings.findOne({ where: { name: "mcChatWebhookToken" } });
if(mcChatWebhookToken){ if(mcChatWebhookToken){
mcChatWebhook = new WebhookClient(mcChatWebhookId.value, mcChatWebhookToken.value); mcChatWebhook = new WebhookClient({ id: webhook.id, token: webhook.token });
}else{ }else{
console.log("['" + 'ERREUR'.brightRed + "] Impossible de trouver le token du webhook dans la base de donnée."); console.log("['" + 'ERREUR'.brightRed + "] Impossible de trouver le token du webhook dans la base de donnée.");
createMcChatWebhook(); createMcChatWebhook();
...@@ -485,7 +485,7 @@ function createMcChatWebhook(){ ...@@ -485,7 +485,7 @@ function createMcChatWebhook(){
name: "mcChatWebhookToken", name: "mcChatWebhookToken",
value: webhook.token value: webhook.token
}); });
mcChatWebhook = new WebhookClient(webhook.id, webhook.token); mcChatWebhook = new WebhookClient({ id: webhook.id, token: webhook.token });
console.log("['" + 'INFO'.yellow + "] Le Webhook du serveur MC a été configuré avec succès."); console.log("['" + 'INFO'.yellow + "] Le Webhook du serveur MC a été configuré avec succès.");
}) })
.catch(console.error); .catch(console.error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment