mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
update design for stickers
This commit is contained in:
parent
4ab839cf4e
commit
2ddd71279c
2 changed files with 7 additions and 7 deletions
|
@ -2,7 +2,7 @@ const { emojipedia, emojiKitchen } = require("#api");
|
|||
|
||||
const { createEmbed, formatPaginationEmbeds } = require("#utils/embed");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
const { pill, timestamp } = require("#utils/markdown");
|
||||
const { pill, timestamp, icon } = require("#utils/markdown");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
const { STATICS, STATIC_ASSETS } = require("#utils/statics");
|
||||
|
||||
|
@ -87,7 +87,7 @@ module.exports = {
|
|||
let sprites = entries.splice(0, 4);
|
||||
let embeds = [];
|
||||
for(const s of sprites){
|
||||
let fields = sprites.map((s)=>{return {inline: true,name:`\\:${s.name}\\:`,value:`-# ID: ${s.id}\n-# Created ${timestamp(Snowflake.timestamp(s.id),"R")}${context.guild.emojis.find((e)=>e.id == matches[0].id) ? "\n-# Custom emoji is from this server" : ""}`}});
|
||||
let fields = sprites.map((s)=>{return {inline: true,name:`${icon("emoji")} \\:${s.name}\\:`,value:`-# ID: ${s.id}\n-# Created ${timestamp(Snowflake.timestamp(s.id),"R")}${context.guild.emojis.find((e)=>e.id == matches[0].id) ? "\n-# Custom emoji is from this server" : ""}`}});
|
||||
if(fields.length >= 3){
|
||||
fields.splice(2,0,{name:` `, value:` `, inline:true})
|
||||
if(fields.length == 5) fields.push({name:` `, value:` `, inline:true})
|
||||
|
|
|
@ -3,7 +3,7 @@ const { EMOJIPEDIA_PLATFORM_TYPES, EMOJIPEDIA_PLATFORM_TYPE_ALIASES, PERMISSION_
|
|||
const { ingest } = require("#logging");
|
||||
|
||||
const { createEmbed, formatPaginationEmbeds } = require("#utils/embed");
|
||||
const { pill, iconPill, highlight, timestamp, smallIconPill } = require("#utils/markdown");
|
||||
const { pill, iconPill, highlight, timestamp, smallIconPill, icon } = require("#utils/markdown");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
const { STATICS, STATIC_ASSETS } = require("#utils/statics");
|
||||
|
||||
|
@ -67,17 +67,17 @@ module.exports = {
|
|||
let s = msg.stickerItems.first()
|
||||
// lottie
|
||||
if(s.formatType == 3) return editOrReply(context, createEmbed("default", context, {
|
||||
description: `${iconPill("sticker", s.name)} ${highlight(`(${s.id})`)}\nhttps://cdn.discordapp.com/stickers/${s.id}.json`,
|
||||
fields: [{name: `${icon("sticker")} ${s.name}`, value:`\n-# ID: ${s.id}\n-# Created at ${timestamp(Snowflake.timestamp(s.id),"R")}\n\nhttps://cdn.discordapp.com/stickers/${s.id}.json`}],
|
||||
}))
|
||||
// gif
|
||||
if(s.formatType == 4) return editOrReply(context, createEmbed("default", context, {
|
||||
description: `${iconPill("sticker", s.name)} ${highlight(`(${s.id})`)}`,
|
||||
fields: [{name: `${icon("sticker")} ${s.name}`, value:`\n-# ID: ${s.id}\n-# Created at ${timestamp(Snowflake.timestamp(s.id),"R")}`}],
|
||||
image: {
|
||||
url: `https://media.discordapp.net/stickers/${s.id}.gif?size=4096`,
|
||||
}
|
||||
}))
|
||||
return editOrReply(context, createEmbed("default", context, {
|
||||
description: `${iconPill("sticker", s.name)} ${highlight(`(${s.id})`)}`,
|
||||
fields: [{name: `${icon("sticker")} ${s.name}`, value:`\n-# ID: ${s.id}\n-# Created at ${timestamp(Snowflake.timestamp(s.id),"R")}`}],
|
||||
image: {
|
||||
url: `https://media.discordapp.net/stickers/${s.id}.png?size=4096&passthrough=true`
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ module.exports = {
|
|||
let sprites = entries.splice(0, 4);
|
||||
let embeds = [];
|
||||
for(const s of sprites){
|
||||
let fields = sprites.map((s)=>{return {inline: true,name:`\\:${s.name}\\:`,value:`-# ID: ${s.id}\n-# Created ${timestamp(Snowflake.timestamp(s.id),"R")}${context.guild.emojis.find((e)=>e.id == matches[0].id) ? "\n-# Custom emoji is from this server" : ""}`}});
|
||||
let fields = sprites.map((s)=>{return {inline: true,name:`${icon("emoji")} \\:${s.name}\\:`,value:`-# ID: ${s.id}\n-# Created ${timestamp(Snowflake.timestamp(s.id),"R")}${context.guild.emojis.find((e)=>e.id == matches[0].id) ? "\n-# Custom emoji is from this server" : ""}`}});
|
||||
if(fields.length >= 3){
|
||||
fields.splice(2,0,{name:` `, value:` `, inline:true})
|
||||
if(fields.length == 5) fields.push({name:` `, value:` `, inline:true})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue