#command user mention
1 messages · Page 1 of 1 (latest)
Nope.
Funnily enough, I have another command in my bot that I am able to pull the user mention from the embed. It doesn’t work in this one though.
This is interaction.message for the screenshot I sent.
<ref *1> Message {
channelId: '918964761167798272',
guildId: '911516186620088321',
id: '930254700496977974',
createdTimestamp: 1641860403895,
type: 'APPLICATION_COMMAND',
system: false,
content: '',
author: ClientUser {
id: '920794936679497799',
bot: true,
system: false,
flags: UserFlags { bitfield: 0 },
username: 'GolemHeart Dev',
discriminator: '3111',
avatar: 'fe6076c8c7ba77a06e1cc61fe02d54d2',
banner: undefined,
accentColor: undefined,
verified: true,
mfaEnabled: true
},
pinned: false,
tts: false,
nonce: null,
embeds: [
MessageEmbed {
type: 'rich',
title: "Let's Flip a Coin!",
description: '@dim latch got **heads**!',
url: null,
color: 16756741,
timestamp: null,
fields: [Array],
thumbnail: [Object],
image: null,
video: null,
author: null,
provider: null,
footer: [Object]
}
],
components: [ MessageActionRow { type: 'ACTION_ROW', components: [Array] } ],
attachments: Collection(0) [Map] {},
stickers: Collection(0) [Map] {},
editedTimestamp: null,
reactions: ReactionManager { message: [Circular *1] },
mentions: MessageMentions {
everyone: false,
users: Collection(0) [Map] {},
roles: Collection(0) [Map] {},
_members: null,
_channels: null,
crosspostedChannels: Collection(0) [Map] {},
repliedUser: null
},
webhookId: '920794936679497799',
groupActivityApplication: null,
applicationId: '920794936679497799',
activity: null,
flags: MessageFlags { bitfield: 0 },
reference: null,
interaction: {
id: '930254700102688798',
type: 'APPLICATION_COMMAND',
commandName: 'flip',
user: User {
id: '396390132988641281',
bot: false,
system: false,
flags: [UserFlags],
username: 'Wisecompany',
discriminator: '0001',
avatar: '229258248b2111883125b273318360a0',
banner: undefined,
accentColor: undefined
}
}
}
To be clear, this is the interaction.message from clicking the button.
What's the interaction ID itself? (Checking to see if it's different from interaction.message.interaction.id)
They are different
To be clear, the embed is generated from a user using the /flip command (interaction 1). The button generates a new interaction (interaction 2). This is the interaction in which I need to retrieve interaction1.user from.
If they're different, how about interaction.message.interaction.user?