How can I get the content of the message that the bot sends?
<ref *1> Message {
channelId: '1221859309558698054',
guildId: '1220786860604002446',
id: '1221863417674203277',
createdTimestamp: 1711385339898,
type: 20,
system: false,
content: '',
author: User {
id: '1220076230511034478',
bot: true,
system: false,
flags: UserFlagsBitField { bitfield: 0 },
username: 'fwwfafw',
globalName: null,
discriminator: '6208',
avatar: 'ea972e6855b1cad66eb11b020a525b2c',
banner: undefined,
accentColor: undefined,
avatarDecoration: null
},
pinned: false,
tts: false,
nonce: '1221863421264396288',
embeds: [],
components: [],
attachments: Collection(0) [Map] {},
stickers: Collection(0) [Map] {},
position: 0,
roleSubscriptionData: null,
resolved: null,
editedTimestamp: null,
reactions: ReactionManager { message: [Circular *1] },
mentions: MessageMentions {
everyone: false,
users: Collection(0) [Map] {},
roles: Collection(0) [Map] {},
_members: null,
_channels: null,
_parsedUsers: null,
crosspostedChannels: Collection(0) [Map] {},
repliedUser: null
},
webhookId: '1220076230511034478',
groupActivityApplication: null,
applicationId: '1220076230511034478',
activity: null,
flags: MessageFlagsBitField { bitfield: 128 },
reference: null,
interaction: {
id: '1221863417015566336',
type: 2,
commandName: 'stock',
user: User {
id: '1195264144635609168',
bot: false,
system: false,
flags: [UserFlagsBitField],
username: 'abigails_45568',
globalName: 'stormnitro.com',
discriminator: '0',
avatar: '3957775c711c35b1e4c17151db1988f1',
banner: undefined,
accentColor: undefined,
avatarDecoration: null
}
}
}
How can I get the content of the message that the bot sends?
5 Replies
- 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!This is the content I want to pull
if you have the message id you can use hidden embeds and access the data from there, for example
i didn't test this so it may be slightly inaccurate but the idea would still work
if your own bot sent this you already have the content accessible to you in your code