[AB-65] adding ability to join a reminder via button

adding reminder text to slash button reminder
This commit is contained in:
Sheldan
2022-08-28 23:14:27 +02:00
parent f6ed141328
commit 1241571048
9 changed files with 54 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
{
"embeds": [
{
<#include "abstracto_color">,
"metaConfig" : {
"preventEmptyEmbed": "true"
},
"description": "
<#if failedToJoin>
<@safe_include "remind_reminder_join_failed"/>
<#elseif selfJoin>
<@safe_include "remind_reminder_self_join"/>
<#else>
<#if joined>
<#include "format_instant">
<#assign targetDate><@format_instant_date_time instant=reminderDate/></#assign>
<@safe_include "remind_reminder_joined"/>
<#else>
<@safe_include "remind_reminder_left"/>
</#if>
</#if>"
}
],
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -2,7 +2,8 @@
"embeds": [
{
<#include "member_author">
<@member_author member=member/>,
<#include "member_avatar">
<@member_display_author member=memberNameDisplay/>,
<#include "abstracto_color">,
"description": "<@safe_include "remind_reminder_description"/>",
"fields": [
@@ -21,5 +22,9 @@
]
}
],
"additionalMessage": "${member.asMention?json_string} 🔔"
<#assign participantsMentions><#list reminderParticipants as participant>${participant.memberMention}<#sep>, </#list></#assign>
"additionalMessage": "${memberNameDisplay.memberMention?json_string} 🔔
${participantsMentions}
"
}

View File

@@ -3,16 +3,28 @@
{
<#assign id>${reminder.id}</#assign>
<#include "member_author">
<@member_author member=member/>,
<#include "member_avatar">
<@member_display_author member=memberDisplay/>,
<#include "abstracto_color">,
<#if message?has_content>
<#assign messageUrl>${message.jumpUrl}</#assign>
"description": "<@safe_include "remind_reminding_description_text"/>"
<#else>
<#assign reminderText=remindText?json_string>
"description": "<@safe_include "remind_reminding_description_slash_text"/>"
</#if>
}
],
"additionalMessage": "${member.asMention?json_string}"
"additionalMessage": "${memberDisplay.memberMention?json_string}",
"buttons": [
{
"label": "<@safe_include "remind_reminder_join_button_label"/>",
"id": "${joinButtonId}",
"buttonStyle": "secondary",
"metaConfig": {
"persistCallback": false
}
}
]
}

View File

@@ -0,0 +1 @@
Failed to join reminder. It may be in the past.

View File

@@ -0,0 +1 @@
You joined the reminder and will also be notified at ${targetDate}. Click the button again to not be notified anymore.

View File

@@ -0,0 +1 @@
You will not be notified about the reminder.

View File

@@ -0,0 +1 @@
You cannot join yourself.

View File

@@ -1 +1 @@
Scheduled reminder with ID ${id} to remind you.
Scheduled reminder with ID ${id} to remind you of `${reminderText}`.