const { id } = interaction.user
        const guild = await client.guilds.fetch(interaction.guildId)
      const discordUser = await guild.fetch(id)

      Javascript language logo
      fetch interaction user

      discord.js

      The code first initializes an object containing information about the user, interaction.user. Next, it fetch the guild for the given interaction.guildId, using the client.guilds.fetch() method. Finally, it fetches the discordUser for the given guild.

      Shortcut: discordjs.utils.fetchInteractionUser

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.