Skip to content

Commit

Permalink
update to fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-flip committed Jun 13, 2024
1 parent 53e858a commit c7a7429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/nsfw/allow.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ module.exports.run = async (interaction, moment, EmbedBuilder) => {
const DBentry = await searchUser(userID);
if (!DBentry) return postFail(interaction, user);
// get teamember and servername tag
const teammember = client.users.cache.find(({ id }) => id === DBentry.teammemberID);
const teammember = client.users.fetch(DBentry.teammemberID);
const teammemberTag = teammember ? teammember.tag : 'Unknown';
const server = client.guilds.cache.find(({ id }) => id === DBentry.serverID);
const server = client.guilds.fetch(DBentry.serverID);
const serverName = server ? server.name : 'Unknown';
// send log and user confirmation
sendMessage(EmbedBuilder, interaction, user.tag, userID, DBentry.allow, teammemberTag, serverName);
Expand Down

0 comments on commit c7a7429

Please sign in to comment.