added embed support fo message deleted and message edited

added attachment support for message deleted
added imageUrl support to embed templating
This commit is contained in:
Sheldan
2020-03-20 21:20:14 +01:00
parent ff29edbdac
commit d3a9a7a9f0
13 changed files with 102 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
{
"imageUrl": "${imageUrl}",
"fields": [
{
"name": "Direct Url",
"value": "[Link](${imageUrl})"
}
],
"footer": {
"text": "Attachment #${counter}"
}
}

View File

@@ -0,0 +1,22 @@
{
"author": {
"name": "${member.effectiveName}#${member.user.discriminator}",
"avatar": "${member.user.effectiveAvatarUrl}"
},
"description": "Message from ${member.effectiveName}#${member.user.discriminator} (${member.idLong?c}) removed in ${textChannel.asMention}",
"color" : {
"r": 200,
"g": 0,
"b": 0
},
"fields": [
{
"name": ":x: Original Message: ",
"value": "${message.contentRaw}"
},
{
"name": "Link",
"value": "[${textChannel.name}](${message.jumpUrl})"
}
]
}

View File

@@ -0,0 +1,26 @@
{
"author": {
"name": "${member.effectiveName}#${member.user.discriminator}",
"avatar": "${member.user.effectiveAvatarUrl}"
},
"description": "Message from ${member.effectiveName}#${member.user.discriminator} (${member.idLong?c}) edited in ${textChannel.asMention}",
"color" : {
"r": 200,
"g": 0,
"b": 0
},
"fields": [
{
"name": "Original Message: ",
"value": "${messageBefore.contentRaw}"
},
{
"name": "New Message: ",
"value": "${messageAfter.contentRaw}"
},
{
"name": "Jump link",
"value": "[${textChannel.name}](${messageBefore.jumpUrl})"
}
]
}

View File

@@ -25,7 +25,7 @@
<#if warning?has_content>
{
"name": "Location of the incident",
"value": "[${textChannel.name}](${messageLink})"
"value": "[${textChannel.name}](${message.jumpUrl})"
},
</#if>
{