diff --git a/README.md b/README.md index 63e97749..4a8f2562 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ JaBa offers: * Slash and Context commands. * Supports commands in DMs. * Localization support (any language; English, Russian and Ukrainian now). -* Dashboard for changing various settings.\ +* Dashboard for changing various settings. +* Basic messages monitoring (Updating and deletion). ## Commands diff --git a/events/Monitoring/messageDelete.js b/events/Monitoring/messageDelete.js index b9c4c2d8..5c01ab37 100644 --- a/events/Monitoring/messageDelete.js +++ b/events/Monitoring/messageDelete.js @@ -25,8 +25,8 @@ class messageDelete extends BaseEvent { name: message.author.getUsername(), iconURL: message.author.displayAvatarURL(), }, - title: `${message.author.getUsername()} deleted a message!`, - description: `Message content was: \`\`\`${message.content}\`\`\``, + title: message.translate("common:MONITORING:DELETE:TITLE", { user: message.author.getUsername() }), + description: message.translate("common:MONITORING:DELETE:DESCRIPTION", { content: message.content, channel: message.channel.toString(), time: message.createdTimestamp }), }); message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({ diff --git a/events/Monitoring/messageUpdate.js b/events/Monitoring/messageUpdate.js index 73cc09b7..077ba95b 100644 --- a/events/Monitoring/messageUpdate.js +++ b/events/Monitoring/messageUpdate.js @@ -28,8 +28,8 @@ class messageUpdate extends BaseEvent { name: newMessage.author.getUsername(), iconURL: newMessage.author.displayAvatarURL(), }, - title: `${newMessage.author.getUsername()} edited a message!`, - description: `Old Message: \`\`\`${oldMessage.content}\`\`\`\nNew Message: \`\`\`${newMessage.content}\`\`\`\nJump to message: ${newMessage.url}`, + title: newMessage.translate("common:MONITORING:UPDATE:TITLE", { user: newMessage.author.getUsername() }), + description: newMessage.translate("common:MONITORING:UPDATE:DESCRIPTION", { oldContent: oldMessage.content, newContent: newMessage.content, url: newMessage.url }), }); newMessage.guild.channels.cache.get(guildData.plugins.monitoring.messageUpdate).send({ diff --git a/languages/en-US/misc.json b/languages/en-US/misc.json index 35d476b5..992fbc90 100644 --- a/languages/en-US/misc.json +++ b/languages/en-US/misc.json @@ -21,6 +21,17 @@ "QUOTE_JUMP": "Jump to", "QUOTE_FOOTER": "Quoted by {{user}}", + "MONITORING": { + "DELETE": { + "TITLE": "{{user}} deleted a message!", + "DESCRIPTION": "Message content was: ```{{content}}```\nChannel: {{channel}}\nTime created: {{time}}" + }, + "UPDATE": { + "TITLE": "{{user}} updated a message!", + "DESCRIPTION": "Old Message: ```{{oldContent}}```\nNew Message: ```{{newContent}}```\nJump to message: {{url}}" + } + }, + "PERMISSIONS": { "CreateInstantInvite": "Create Instant Invite", "KickMembers": "Kick Members", diff --git a/languages/ru-RU/misc.json b/languages/ru-RU/misc.json index 2b79f536..b8715eb9 100644 --- a/languages/ru-RU/misc.json +++ b/languages/ru-RU/misc.json @@ -21,6 +21,17 @@ "QUOTE_JUMP": "Перейти к", "QUOTE_FOOTER": "Цитировал {{user}}", + "MONITORING": { + "DELETE": { + "TITLE": "{{user}} удалил сообщение!", + "DESCRIPTION": "Содержимое сообщения было: ```{{content}}```\nКанал: {{channel}}\nВремя создания: {{time}}" + }, + "UPDATE": { + "TITLE": "{{user}} обновил сообщение!", + "DESCRIPTION": "Старое сообщение: ```{{oldContent}}```\nНовое сообщение: ```{{newContent}}```\nПерейти к сообщению: {{url}}" + } + }, + "PERMISSIONS": { "CreateInstantInvite": "Создание приглашения", "KickMembers": "Выгонять участников", diff --git a/languages/uk-UA/misc.json b/languages/uk-UA/misc.json index e222cff5..e7f35961 100644 --- a/languages/uk-UA/misc.json +++ b/languages/uk-UA/misc.json @@ -21,6 +21,17 @@ "QUOTE_JUMP": "Перейти до", "QUOTE_FOOTER": "Цитував {{user}}", + "MONITORING": { + "DELETE": { + "TITLE": "{{user}} видалив повідомлення!", + "DESCRIPTION": "Вміст повідомлення було: ```{{content}}```\nКанал: {{channel}}\nЧас створення: {{time}}" + }, + "UPDATE": { + "TITLE": "{{user}} оновив повідомлення!", + "DESCRIPTION": "Старе повідомлення: ```{{oldContent}}```\nНове повідомлення: ```{{newContent}}```\nПерейти до повідомлення: {{url}}" + } + }, + "PERMISSIONS": { "CreateInstantInvite": "Створення запрошення", "KickMembers": "Виганяти учасників",