mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-18 04:50:38 +00:00
added starboard functionality (starboard/starstats)
added module to store/retrieve configuration (double and string values) replaced a few null values with optionals (emote loading) fixed creating channels on startup added delete message/get emote utility to bot service extended emote service to have utility methods to use emotes added reactions to message cache added empty message handling to post target service, in case the template evaluates to empty added ability to edit a message in a post target (standard message and embed) added principle of config listeners, so default config can be created, for example starboard thresholds added abstract reaction listeners for adding/removing/clearing fixed foreign keys between channel and server added emote utils to handle AEmote and Emotes renamed emotes to be camelCase, so they are easier to type
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Shows the current leaderboard of starboard posts.
|
||||
@@ -0,0 +1 @@
|
||||
Shows the current leaderboard of starboard posts.
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"title": {
|
||||
"title": "Server starboard stats"
|
||||
},
|
||||
"color" : {
|
||||
"r": 200,
|
||||
"g": 0,
|
||||
"b": 255
|
||||
},
|
||||
"description": "${starredMessages} starred messages with ${totalStars} stars in total",
|
||||
"fields": [
|
||||
{
|
||||
"name": "Top starred posts",
|
||||
"value": "
|
||||
<#list topPosts as post>
|
||||
${badgeEmotes[post?index]} - ${post.starCount} :star: [Jump!](${post.messageUrl})
|
||||
<#else>
|
||||
No starred messages.
|
||||
</#list>
|
||||
"
|
||||
},
|
||||
{
|
||||
"name": "Top starrer",
|
||||
"value": "
|
||||
<#list starGiver as starrer>
|
||||
<#if starrer.member?has_content>
|
||||
${badgeEmotes[starrer?index]} - ${starrer.starCount} :star: ${starrer.member.asMention}
|
||||
<#else>
|
||||
${badgeEmotes[starrer?index]} - ${starrer.starCount} :star: ${starrer.user.id?c} (Left the guild)
|
||||
</#if>
|
||||
<#else>
|
||||
No starred messages.
|
||||
</#list>
|
||||
"
|
||||
},
|
||||
{
|
||||
"name": "Top star receiver",
|
||||
"value": "
|
||||
<#list starReceiver as starred>
|
||||
<#if starred.member?has_content>
|
||||
${badgeEmotes[starred?index]} - ${starred.starCount} :star: ${starred.member.asMention}
|
||||
<#else>
|
||||
${badgeEmotes[starred?index]} - ${starred.starCount} :star: ${starred.user.id?c} (Left the guild)
|
||||
</#if>
|
||||
<#else>
|
||||
No starred messages.
|
||||
</#list>
|
||||
"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
starStats
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"author": {
|
||||
<#if author?has_content>
|
||||
"name": "${author.effectiveName}",
|
||||
"avatar": "${author.user.effectiveAvatarUrl}"
|
||||
<#else>
|
||||
"name": "${user.id?c} (Has left the server)"
|
||||
</#if>
|
||||
},
|
||||
"color" : {
|
||||
"r": 200,
|
||||
"g": 0,
|
||||
"b": 255
|
||||
},
|
||||
<#if message.content?has_content || message.embeds?size gt 0>
|
||||
"description": "${message.content}
|
||||
<#list message.embeds>
|
||||
Embeds:
|
||||
<#items as embed>
|
||||
Description: ${embed.description} <#if embed.imageUrl?has_content> ImageUrl: ${embed.imageUrl} </#if>
|
||||
</#items>
|
||||
</#list>
|
||||
",
|
||||
</#if>
|
||||
<#if channel?has_content>
|
||||
"additionalMessage": "${starLevelEmote} ${starCount} ${channel.asMention} ID: ${message.messageId?c}",
|
||||
<#else>
|
||||
"additionalMessage": "${starLevelEmote} ${starCount} ${aChannel.id?c} ID: ${message.messageId?c}",
|
||||
</#if>
|
||||
<#if message.attachmentUrls?size gt 0>
|
||||
"imageUrl": "${message.attachmentUrls[0]}",
|
||||
</#if>
|
||||
"fields": [
|
||||
{
|
||||
"name": "Original",
|
||||
<#if channel?has_content>
|
||||
"value": "[${channel.name}](${message.messageUrl})"
|
||||
<#else>
|
||||
"value": "[${aChannel.id?c}](${message.messageUrl})"
|
||||
</#if>
|
||||
}
|
||||
],
|
||||
"timeStamp": "${message.timeCreated}"
|
||||
}
|
||||
@@ -1,8 +1,16 @@
|
||||
abstracto.postTargets.utility=suggestions
|
||||
abstracto.emoteNames.suggestion=SUGGESTION_YES,SUGGESTION_NO
|
||||
abstracto.postTargets.utility=suggestions,starboard
|
||||
abstracto.emoteNames.suggestion=suggestionYes,suggestionNo
|
||||
abstracto.emoteNames.starboard=star,star1,star2,star3,star4,starboardBadge1,starboardBadge2,starboardBadge3
|
||||
abstracto.starboard.lvl[0]=5
|
||||
abstracto.starboard.lvl[1]=8
|
||||
abstracto.starboard.lvl[2]=13
|
||||
abstracto.starboard.lvl[3]=17
|
||||
abstracto.starboard.badge[0]=\ud83e\udd47
|
||||
abstracto.starboard.badge[1]=\ud83e\udd48
|
||||
abstracto.starboard.badge[2]=\ud83e\udd49
|
||||
|
||||
abstracto.scheduling.jobs.reminderJob.name=reminderJob
|
||||
abstracto.scheduling.jobs.reminderJob.group=utility
|
||||
abstracto.scheduling.jobs.reminderJob.clazz=dev.sheldan.abstracto.utility.jobs.ReminderJob
|
||||
abstracto.scheduling.jobs.reminderJob.standAlone=false
|
||||
abstracto.scheduling.jobs.reminderJob.active=true
|
||||
abstracto.scheduling.jobs.reminderJob.active=true
|
||||
|
||||
Reference in New Issue
Block a user