mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 07:03:08 -04:00
detailed emoji info
This commit is contained in:
parent
939fef9b33
commit
98d251b994
5 changed files with 304 additions and 20 deletions
|
@ -178,8 +178,6 @@ module.exports = {
|
|||
|
||||
// this sucks but works, ensures the newly selected option stays selected
|
||||
// update 25/03/24 - it sucks even more now
|
||||
console.log(ctx.data)
|
||||
|
||||
|
||||
if(ctx.data.customId == "emoji-type"){
|
||||
currentPlatform = ctx.data.values[0];
|
||||
|
@ -199,21 +197,16 @@ module.exports = {
|
|||
|
||||
components.components[1].components[0].options = newVersionOptions
|
||||
|
||||
console.log("new type is " + currentPlatform + " with version " + currentRevision)
|
||||
} else if(ctx.data.customId == "emoji-version"){
|
||||
|
||||
for (let i = 0; i < components.components[1].components[0].options.length; i++) {
|
||||
components.components[1].components[0].options[i].default = (components.components[1].components[0].options[i].value == ctx.data.values[0])
|
||||
}
|
||||
currentRevision = ctx.data.values[0];
|
||||
console.log("new version is " + currentRevision);
|
||||
}
|
||||
|
||||
console.log("getting asset for " + currentPlatform + " ver " + currentRevision);
|
||||
const emojiAsset = res.data.platforms[currentPlatform].images.filter((p)=>{
|
||||
return p.id == currentRevision
|
||||
})
|
||||
console.log("got asset: " + emojiAsset)
|
||||
|
||||
currentView = createEmbed("default", context, {
|
||||
author: {
|
||||
|
@ -231,9 +224,7 @@ module.exports = {
|
|||
}
|
||||
})
|
||||
|
||||
console.log("acknowledging for plat " + currentPlatform + " and ver " + currentRevision)
|
||||
await ctx.editOrRespond({embeds: [currentView], components})
|
||||
console.log("acknowledged")
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue