📅  最后修改于: 2022-03-11 15:02:42.078000             🧑  作者: Mango
const embedHelper = async (title: string, desc: string) => {
const rn = new Date()
const creator = await getUserFromId('CREATOR ID HERE')
const embed = new MessageEmbed()
embed.setAuthor(client.user?.username!, client.user?.avatarURL()!)
.setTitle(title)
.setDescription(desc)
.setTimestamp(rn)
.setFooter(`Bot made by ${creator.tag}`, creator.avatarURL()!)
.setURL('BOT SUPPORT SERVER')
return embed
}
const embed = await embedHelper('Yo', "Lol")
const attachment = new MessageAttachment(String(imgDir + img), img)
embed.setImage(`attachment://${img}`)
await message.reply({
embeds: [embed],
files: [
attachment
]
})