mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 18:39:35 +02:00
Calculate format to gif if it's a gif in info
This commit is contained in:
@@ -21,10 +21,11 @@ module.exports = class MessageInfoCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { message }) {
|
||||
const format = msg.author.avatar && msg.author.avatar.startsWith('a_') ? 'gif' : 'png';
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(message.member ? message.member.displayHexColor : 0x00AE86)
|
||||
.setThumbnail(message.author.displayAvatarURL({ format: 'png' }))
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL({ format: 'png' }))
|
||||
.setThumbnail(message.author.displayAvatarURL({ format }))
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL({ format }))
|
||||
.setDescription(message.content)
|
||||
.setTimestamp(message.createdAt)
|
||||
.setFooter(`ID: ${message.id}`)
|
||||
|
||||
@@ -30,8 +30,9 @@ module.exports = class UserInfoCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { user }) {
|
||||
const format = msg.author.avatar && msg.author.avatar.startsWith('a_') ? 'gif' : 'png';
|
||||
const embed = new MessageEmbed()
|
||||
.setThumbnail(user.displayAvatarURL({ format: 'png' }))
|
||||
.setThumbnail(user.displayAvatarURL({ format }))
|
||||
.addField('❯ Name', user.tag, true)
|
||||
.addField('❯ ID', user.id, true)
|
||||
.addField('❯ Discord Join Date', moment.utc(user.createdAt).format('MM/DD/YYYY h:mm A'), true)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "93.1.1",
|
||||
"version": "93.1.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user