Compare commits

...

2 commits

2 changed files with 18 additions and 5 deletions

View file

@ -9,6 +9,9 @@ const avatar = new Command("avatar");
avatar.category = "utility";
avatar.helpText = "Get avatar of a user";
avatar.usage = "<user>";
avatar.addAlias("av");
avatar.addAlias("avi");
avatar.addAlias("pfp");
avatar.callback = async function (msg, line, [user], {server, guild}) {
let member = msg.member ?? msg.author;
const guildObj = msg.channel.guild || hf.bot.guilds.get(msg.guildID);

View file

@ -69,7 +69,11 @@ lookupinvite.callback = async function (msg, line) {
const inviter = invite.inviter
? {
name: "Inviter",
value: `**${formatUsername(invite.inviter)}** (${invite.inviter.id})`,
value: `${
invite.inviter.global_name
? `**${invite.inviter.global_name}** (${formatUsername(invite.inviter)})`
: `**${formatUsername(invite.inviter)}**`
} \`(${invite.inviter.id})\``,
inline: false,
}
: null;
@ -80,12 +84,12 @@ lookupinvite.callback = async function (msg, line) {
...[
{
name: "Guild",
value: `**${invite.guild.name}** (${invite.guild.id})`,
value: `**${invite.guild.name}** \`(${invite.guild.id})\``,
inline: true,
},
{
name: "Channel",
value: `**${invite.channel.name}** (${invite.channel.id})`,
value: `**${invite.channel.name}** \`(${invite.channel.id})\``,
inline: true,
},
{
@ -96,7 +100,7 @@ lookupinvite.callback = async function (msg, line) {
expires,
{
name: "Member Count",
value: `${Icons.online}${invite.approximate_presence_count} online${Icons.blank}${Icons.blank}${Icons.offline}${invite.approximate_member_count} members`,
value: `${Icons.online}${invite.approximate_presence_count} online\u3000\u3000${Icons.offline}${invite.approximate_member_count} members`,
inline: false,
},
inviter,
@ -181,7 +185,13 @@ lookupinvite.callback = async function (msg, line) {
expires,
invite.channel.name != null && {
name: "Recipients",
value: invite.channel.recipients.map((member) => member.username).join(", "),
value: invite.channel.recipients
.map((member) =>
member.global_name
? `**${member.global_name}** (${formatUsername(member)})`
: `**${formatUsername(member)}**`
)
.join("\n"),
inline: false,
},
inviter,