This commit is contained in:
big nutty 2023-11-08 07:54:04 +00:00
parent 8f050c7b8a
commit d9ad16a32e

View file

@ -166,6 +166,7 @@ module.exports = {
} }
})) }))
let currentView ;
const components = new Components({ const components = new Components({
timeout: 100000, timeout: 100000,
run: async (ctx) => { run: async (ctx) => {
@ -175,7 +176,7 @@ module.exports = {
return p.id == ctx.data.values[0] return p.id == ctx.data.values[0]
}) })
await ctx.editOrRespond({embeds: [createEmbed("default", context, { currentView = createEmbed("default", context, {
author: { author: {
iconUrl: ico, iconUrl: ico,
name: `${res.data.name}${emojiAsset[0].version}`, name: `${res.data.name}${emojiAsset[0].version}`,
@ -189,7 +190,8 @@ module.exports = {
iconUrl: STATICS.emojipedia, iconUrl: STATICS.emojipedia,
text: `Emojipedia • ${context.application.name}` text: `Emojipedia • ${context.application.name}`
} }
})], components}) })
await ctx.editOrRespond({embeds: [currentView], components})
}, },
}); });
@ -209,11 +211,12 @@ module.exports = {
setTimeout(()=>{ setTimeout(()=>{
editOrReply(context, { editOrReply(context, {
embeds:[currentView],
components:[] components:[]
}) })
}, 100000) }, 100000)
return editOrReply(context, {embeds: [createEmbed("default", context, { currentView = createEmbed("default", context, {
author: { author: {
iconUrl: ico, iconUrl: ico,
name: `${res.data.name}${res.data.platforms[args.type].images[0].version}`, name: `${res.data.name}${res.data.platforms[args.type].images[0].version}`,
@ -227,7 +230,8 @@ module.exports = {
iconUrl: STATICS.emojipedia, iconUrl: STATICS.emojipedia,
text: `Emojipedia • ${context.application.name}` text: `Emojipedia • ${context.application.name}`
} }
})], components}) })
return editOrReply(context, {embeds: [currentView], components})
} }
} }
}; };