Skip to content

Commit

Permalink
added error handling to /user (bot exited when a user checked a bot's…
Browse files Browse the repository at this point in the history
… details)
  • Loading branch information
vb2007 committed Jul 28, 2024
1 parent b67d482 commit d2fd8d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/utility/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ module.exports = {
title: "User information.",
// thumbnail: targetUser.displayAvatarURL({ dynamic: true }),
fields: [
{ name: "Username", value: targetUser.username, inline : true },
{ name: "Display name", value: targetUser.globalName, inline : true },
{ name: "Username", value: targetUser.username || "None", inline : true },
{ name: "Display name", value: targetUser.globalName || "None", inline : true },
{ name: "Nickname", value: targetMember.nickname || "None", inline : true },
{ name: "Avatar", value: `${targetMember.displayAvatarURL({ dynamic: true })}` },
{ name: "Joined at", value: `<t:${parseInt(targetMember.joinedAt / 1000)}:R>`, inline: true },
Expand All @@ -35,7 +35,7 @@ module.exports = {
// { name: "Activity", value: targetMember.presence?.activities[0] ? targetMember.presence.activities[0] : "None", inline : true },
{ name: "Bot?", value: targetUser.bot, inline : true },
{ name: "User Id", value: targetUser.id, inline: true },
// { name: "Is online?", value: targetUser.presence.status === "online", inline : true },
{ name: "Custom status", value: targetUser.presence || "No status", inline : true },
// { name: "Is dnd?", value: targetUser.presence.status === "dnd", inline : true },
// { name: "Is idle?", value: targetUser.presence.status === "idle", inline : true },
// { name: "Is offline?", value: targetUser.presence.status === "offline", inline : true },
Expand Down

0 comments on commit d2fd8d9

Please sign in to comment.