3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-08 11:37:20 +00:00

some more patches thanks to ruby

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-11-26 14:53:54 +00:00
parent ba4a2b45b8
commit 10bb0b67bc
18 changed files with 69 additions and 52 deletions

View file

@ -100,8 +100,8 @@ export const AboutCmd = utilityCmd({
}
// Use the bot avatar as the embed image
if (pluginData.client.user!.avatarURL()) {
aboutEmbed.thumbnail = { url: pluginData.client.user!.avatarURL()! };
if (pluginData.client.user!.displayAvatarURL()) {
aboutEmbed.thumbnail = { url: pluginData.client.user!.displayAvatarURL()! };
}
msg.channel.send({ embeds: [aboutEmbed] });

View file

@ -1,7 +1,7 @@
import { APIEmbed, ImageFormat } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage } from "../../../pluginUtils";
import { UnknownUser, renderUserUsername } from "../../../utils";
import { UnknownUser, renderUsername } from "../../../utils";
import { utilityCmd } from "../types";
export const AvatarCmd = utilityCmd({
@ -10,17 +10,17 @@ export const AvatarCmd = utilityCmd({
permission: "can_avatar",
signature: {
user: ct.resolvedUserLoose({ required: false }),
user: ct.resolvedMember({ required: false }) || ct.resolvedUserLoose({ required: false }),
},
async run({ message: msg, args, pluginData }) {
const user = args.user || msg.author;
const user = args.user || msg.member || msg.author;
if (!(user instanceof UnknownUser)) {
const embed: APIEmbed = {
image: {
url: user.displayAvatarURL({ extension: ImageFormat.PNG, size: 2048 }),
},
title: `Avatar of ${renderUserUsername(user)}:`,
title: `Avatar of ${renderUsername(user)}:`,
};
msg.channel.send({ embeds: [embed] });
} else {