#wtf ?

1 messages · Page 1 of 1 (latest)

calm flax
#

edited ?

#

How did you get your message content in your code ?

runic iron
#

What did you use to get the "773738409994747904"

#

I use other user id.

#
   if (interaction.isButton()) {
        if (interaction.customId.includes(`checkuser-id`)) {
            await interaction.deferReply({ ephemeral: true })
           // const user = client.users.cache.get(interaction.user.id);
            var tempmsg = await interaction.followUp({
                embeds: [new MessageEmbed()
                    .setColor("RANDOM")
                    .setDescription("**Please user id!** ")
                    .setTimestamp()
                ]
            })

            await tempmsg.channel.awaitMessages({
                filter: i => i.author.id === interaction.user.id,
                max: 1,
                time: 90000,
                errors: ["time"]
              })
              .then(collected => {
            var message = collected.first();
            const channel = client.userss.get(interaction.user.id, "checkme")
            var { content } = message;
                if (content) {
                  try {
                    return interaction.followUp({
                      embeds: [new MessageEmbed()
                        .setColor("RANDOM")
                        .setDescription(`${channel} ✅`)
                        .setTimestamp()
                      ]
                    });
gritty stump
runic iron
#

this 773738409994747904 user id but get 1 ✅ for my id.

acoustic hull
#

@runic iron reexplain what you are trying to do

#

I may know what you’re trying to do just need to make sure

runic iron
# runic iron

Check for this ss.
I click > ❤️ Check user yeah?
I get message Please user id.
I text for friend id(user id) 773738409994747904 this.
but get 1 ✅ (but not 773738409994747904) check.

#

@acoustic hull

calm flax
runic iron
#

Get for me id.

acoustic hull
# runic iron <@749732650209640529>

So you are going to click on the heart button which will ask you to input a user ID, and you have to enter a user ID (ur friend in this case) and it will return their data from ur database?

runic iron
calm flax
#

You are working with database ?

#

Mongoose ?

acoustic hull
runic iron
acoustic hull
calm flax
calm flax
runic iron
# acoustic hull If you want to input a text upon pressing a button use a collector

i using collector

  if (interaction.isButton()) {
        if (interaction.customId.includes(`checkuser-id`)) {
            await interaction.deferReply({ ephemeral: true })
           // const user = client.users.cache.get(interaction.user.id);
            var tempmsg = await interaction.followUp({
                embeds: [new MessageEmbed()
                    .setColor("RANDOM")
                    .setDescription("**Please user id!** ")
                    .setTimestamp()
                ]
            })

            await tempmsg.channel.awaitMessages({
                filter: i => i.author.id === interaction.user.id,
                max: 1,
                time: 90000,
                errors: ["time"]
              })
              .then(collected => {
            var message = collected.first();
            const channel = client.userss.get(interaction.user.id, "checkme")
            var { content } = message;
                if (content) {
                  try {
                    return interaction.followUp({
                      embeds: [new MessageEmbed()
                        .setColor("RANDOM")
                        .setDescription(`${channel} ✅`)
                        .setTimestamp()
                      ]
                    });
#

            const channel = client.userss.get(interaction.user.id, "checkme")
wispy hatch
#

What is client.userss.get(interaction.user.id, "checkme") supposed to do? Try client.users.cache.get(interaction.user.id)

runic iron
runic iron
#

dud.

calm flax
#

you should use mongoose

#

bcs mongodb >>>

wispy hatch
runic iron
acoustic hull
runic iron
#

this problem.

wispy hatch
#

Well, your issue isn't with Discord.js it seems

calm flax
#

const channel = client.userss.get(interaction.user.id, "checkme")
but here, you are checking for user_id not a channel id ???

#

channel = interaction.user_.id ????

#

interaction.user.id return your id

#

not searched id

runic iron
calm flax
#

And, the speed is better with mongodb

acoustic hull
acoustic hull
runic iron
acoustic hull
calm flax
runic iron
calm flax
calm flax
wispy hatch
#

message.content is what you input.

calm flax
#

const user = interaction.guild.members.cache.find(user => user.id === entered_id);

#

But you can use fetch

#

or get

runic iron
# calm flax But you can use fetch
 let entered_id = interaction.options.getString('user_id');
        const user = interaction.guild.members.cache.find(user => user.id === entered_id);

Dud you on /command slash. (this line interaction.options.getString('user_id'); on buttons not work.

calm flax
#
interaction.guild.members.cache.get('User ID');
calm flax
#

combine with that

wispy hatch
#

Still unsure why a user or member needs to be fetched

calm flax
wispy hatch
#

What's the database for then Thonk

calm flax
#

Idk

acoustic hull
#

with the code they provided

runic iron
#

Ok ok

#

it's my

#

bad

#

i did.

#

😄

#
  var { content } = message;
                if (content) {
                  try {
                    const channel = client.userss.get(message, "checkme")

Work fine.
as far as i realized that content reads and checks for that 😄

wispy hatch
#

You're using a message to get something in userss to name the variable channel? I am beyond confused

calm flax
runic iron
wispy hatch
runic iron
#

to name the variable channel? nani? i changed for your nick 😄

#

does the name seem so important?

wispy hatch
#

It's important to be able to understand your code

#

Which right now, I don't

calm flax
#

Imagine having :
let apple = pen

runic iron
calm flax
#

This is the same thing

wispy hatch
#

So what's the issue you're having with djs?

runic iron