mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
localize monitoring
This commit is contained in:
parent
cc0fd759f7
commit
1ff8784066
6 changed files with 39 additions and 5 deletions
|
@ -15,7 +15,8 @@ JaBa offers:
|
||||||
* Slash and Context commands.
|
* Slash and Context commands.
|
||||||
* Supports commands in DMs.
|
* Supports commands in DMs.
|
||||||
* Localization support (any language; English, Russian and Ukrainian now).
|
* 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
|
## Commands
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ class messageDelete extends BaseEvent {
|
||||||
name: message.author.getUsername(),
|
name: message.author.getUsername(),
|
||||||
iconURL: message.author.displayAvatarURL(),
|
iconURL: message.author.displayAvatarURL(),
|
||||||
},
|
},
|
||||||
title: `${message.author.getUsername()} deleted a message!`,
|
title: message.translate("common:MONITORING:DELETE:TITLE", { user: message.author.getUsername() }),
|
||||||
description: `Message content was: \`\`\`${message.content}\`\`\``,
|
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({
|
message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({
|
||||||
|
|
|
@ -28,8 +28,8 @@ class messageUpdate extends BaseEvent {
|
||||||
name: newMessage.author.getUsername(),
|
name: newMessage.author.getUsername(),
|
||||||
iconURL: newMessage.author.displayAvatarURL(),
|
iconURL: newMessage.author.displayAvatarURL(),
|
||||||
},
|
},
|
||||||
title: `${newMessage.author.getUsername()} edited a message!`,
|
title: newMessage.translate("common:MONITORING:UPDATE:TITLE", { user: newMessage.author.getUsername() }),
|
||||||
description: `Old Message: \`\`\`${oldMessage.content}\`\`\`\nNew Message: \`\`\`${newMessage.content}\`\`\`\nJump to message: ${newMessage.url}`,
|
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({
|
newMessage.guild.channels.cache.get(guildData.plugins.monitoring.messageUpdate).send({
|
||||||
|
|
|
@ -21,6 +21,17 @@
|
||||||
"QUOTE_JUMP": "Jump to",
|
"QUOTE_JUMP": "Jump to",
|
||||||
"QUOTE_FOOTER": "Quoted by {{user}}",
|
"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": {
|
"PERMISSIONS": {
|
||||||
"CreateInstantInvite": "Create Instant Invite",
|
"CreateInstantInvite": "Create Instant Invite",
|
||||||
"KickMembers": "Kick Members",
|
"KickMembers": "Kick Members",
|
||||||
|
|
|
@ -21,6 +21,17 @@
|
||||||
"QUOTE_JUMP": "Перейти к",
|
"QUOTE_JUMP": "Перейти к",
|
||||||
"QUOTE_FOOTER": "Цитировал {{user}}",
|
"QUOTE_FOOTER": "Цитировал {{user}}",
|
||||||
|
|
||||||
|
"MONITORING": {
|
||||||
|
"DELETE": {
|
||||||
|
"TITLE": "{{user}} удалил сообщение!",
|
||||||
|
"DESCRIPTION": "Содержимое сообщения было: ```{{content}}```\nКанал: {{channel}}\nВремя создания: {{time}}"
|
||||||
|
},
|
||||||
|
"UPDATE": {
|
||||||
|
"TITLE": "{{user}} обновил сообщение!",
|
||||||
|
"DESCRIPTION": "Старое сообщение: ```{{oldContent}}```\nНовое сообщение: ```{{newContent}}```\nПерейти к сообщению: {{url}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"PERMISSIONS": {
|
"PERMISSIONS": {
|
||||||
"CreateInstantInvite": "Создание приглашения",
|
"CreateInstantInvite": "Создание приглашения",
|
||||||
"KickMembers": "Выгонять участников",
|
"KickMembers": "Выгонять участников",
|
||||||
|
|
|
@ -21,6 +21,17 @@
|
||||||
"QUOTE_JUMP": "Перейти до",
|
"QUOTE_JUMP": "Перейти до",
|
||||||
"QUOTE_FOOTER": "Цитував {{user}}",
|
"QUOTE_FOOTER": "Цитував {{user}}",
|
||||||
|
|
||||||
|
"MONITORING": {
|
||||||
|
"DELETE": {
|
||||||
|
"TITLE": "{{user}} видалив повідомлення!",
|
||||||
|
"DESCRIPTION": "Вміст повідомлення було: ```{{content}}```\nКанал: {{channel}}\nЧас створення: {{time}}"
|
||||||
|
},
|
||||||
|
"UPDATE": {
|
||||||
|
"TITLE": "{{user}} оновив повідомлення!",
|
||||||
|
"DESCRIPTION": "Старе повідомлення: ```{{oldContent}}```\nНове повідомлення: ```{{newContent}}```\nПерейти до повідомлення: {{url}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"PERMISSIONS": {
|
"PERMISSIONS": {
|
||||||
"CreateInstantInvite": "Створення запрошення",
|
"CreateInstantInvite": "Створення запрошення",
|
||||||
"KickMembers": "Виганяти учасників",
|
"KickMembers": "Виганяти учасників",
|
||||||
|
|
Loading…
Reference in a new issue