I want to get the message someone sent while detecting an interaction, and the name of the user who sent it. Currently, interactions.user
shows the user id, not their name.
Can You Explain More What Do You Want And Type The Command Name For More Explain
When someone runs a command, I would like to get their username.
You Can Use interaction.user.username
1 Like
He is Talking About Discord.js v14
@BlueFlameIsHere but that is still JS. It’s also coded in Node.js. GageM1 is literally using JS files in their code.
Yes, But He Want To Get Command Executor Username
@GageM1 use this »
user = interaction.user.username;
user = user.toString();
if (user.includes("!")) {
user = user.split("!")[1].split(">")[0];
} else {
user = user.split("@")[1].split(">")[0];
}
client.users.get(user).username
It gets the username and tag of the user.
I Prefer To Use interaction.user.username
Because He is Using interaction
Not message
And This Is Easier
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.