Get who used a /command on another bot

Hi, I have a bot (Bot1) in our server that i'm trying to create a leaderboard of how many times each user has used a particular slash command (lets call it "/command") The bot in question is a third party bot, so not one that we have control over unfortunately. We have a custom bot (Bot2) that we use for a number of things in the server and I was wondering if there is a way to get the user ID of the person that triggered "/command" on Bot1, so that Bot2 can log the command use in "commandleaderboard.json" ---- To try to illustrate this a little bit better, what i'm after is: <USER> uses /command on Bot 1 Bot 1 will respond to the /command interaction with <RESPONSE MESSAGE> Bot 2 will see the message from Bot 1 and that the message starts with: "Command received" and then retrieve <USER.id> for the person that triggered the command Bot 2 will then store this data in "commandleaderboard.json" I know how to listen for the RESPONSE message, I'm just not sure how, or if it's possible for Bot 2 to get the ID of the user that used the command Thank you
4 Replies
d.js toolkit
d.js toolkit•3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs•3mo ago
:property: Message#interactionMetadata @14.16.2 Partial data of the interaction that this message is a result of :propertysignature: MessageInteractionMetadata#user @14.16.2 The user that invoked the interaction
Amgelo
Amgelo•3mo ago
@Bn102 basically just listen to messageCreate and check those
Bn102
Bn102OP•3mo ago
Thank you - i'll have a look tonight 🙂
Want results from more Discord servers?
Add your server