[SIS-15] adding optional donation listing to donation command

refactoring to use the proper API instead of relying on parsing
prepare for release
This commit is contained in:
Sheldan
2022-12-13 00:31:14 +01:00
parent 8732064764
commit 5390c0e53e
23 changed files with 350 additions and 50 deletions

View File

@@ -1,10 +1,26 @@
{
<#assign donationAmount=donationAmount>
<#assign donationAmount=totalAmount>
<#setting locale="de_DE">
"additionalMessage": "<#include "donations_response_description">",
"embeds": [
{
"imageUrl": "https://cdn.discordapp.com/attachments/299115929206390784/1047306670319079474/dotpict-1.png"
<#if donations?size gt 0>
,<#if type.name() == "LATEST">
"description": "<#include "donations_response_latest_donations_description">"
<#else>
"description": "<#include "donations_response_top_donations_description">"
</#if>
,"fields": [
<#list donations as donation>
{
"name": "<#if donation.anonymous><#include "donations_response_anonymous"><#else>${donation.firstName}</#if>",
"value": "${donation.donationAmount}€",
"inline": true
}
<#sep>,</#list>
]
</#if>
}
]
}

View File

@@ -0,0 +1 @@
The amount of donations you want to load for the specified type. Defaults to 5, max 20.

View File

@@ -0,0 +1 @@
Type of donations you want to load, either 'top' or 'latest'. Default 'latest' for any other value