mirror of
https://github.com/stjornleysi/telegram_glpi.git
synced 2025-12-01 09:33:08 +00:00
log fix
This commit is contained in:
10
lib/utils.js
10
lib/utils.js
@@ -26,7 +26,7 @@ exports.htmlToText = async (text) => {
|
||||
}
|
||||
return messageText.replace(/\[.*?\]/g, '');
|
||||
}catch(e){
|
||||
fs.appendFileSync(dir + "/../logs/logs.txt", e.stack);
|
||||
fs.appendFileSync(dir + "/../logs/logs.txt", e.stack + "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ exports.parseMessageText = async (ticket, ticketAuthor, color) => {
|
||||
}
|
||||
return messageText;
|
||||
}catch(e){
|
||||
fs.appendFileSync(dir + "/../logs/logs.txt", e.stack);
|
||||
fs.appendFileSync(dir + "/../logs/logs.txt", e.stack + "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ exports.createThread = async (bot, messageData, ticketId, title) => {
|
||||
messageData.data[ticketId].pinMessageId = msg.message_id;
|
||||
fs.writeFileSync(dir + "/../data/messageData.json", JSON.stringify(messageData, null, 3));
|
||||
}catch(e){
|
||||
fs.appendFileSync(dir + "/../logs/logs.txt", e.stack);
|
||||
fs.appendFileSync(dir + "/../logs/logs.txt", e.stack + "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ exports.editMessageText = async (bot, messageId, messageText, keyboard) => {
|
||||
reply_markup: {inline_keyboard: keyboard}
|
||||
});
|
||||
}catch(e){
|
||||
//fs.appendFileSync(dir + "/../logs/logs.txt", e.stack);
|
||||
//fs.appendFileSync(dir + "/../logs/logs.txt", e.stack + "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ exports.editMessageMarkup = async (bot, messageId, keyboard) => {
|
||||
try{
|
||||
await bot.telegram.editMessageReplyMarkup(conf.supportChatId, messageId, undefined, {inline_keyboard: keyboard});
|
||||
}catch(e){
|
||||
//fs.appendFileSync(dir + "/../logs/logs.txt", e.stack);
|
||||
//fs.appendFileSync(dir + "/../logs/logs.txt", e.stack + "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user