npm list discord.js and node node -v version?//IDK WHAT THE FUCK IS THIS PART
const messages2 = await thread.messages.fetch()
const messages1 = await thread.messages.fetch({
limit: 1,
after: thread.id,
})
//IDK WHAT THE FUCK IS THIS PART
const message = await thread.messages.fetch({
limit: 1,
after: 0,
})
console.log(message)thread.messages.fetch({
limit: 1,
after: 0,
})threadCreateconsole.log(message)Collection(1) [Map] {
'1216352305750736956' => <ref *1> Message {
channelId: '1216352305750736956',
guildId: '992300928067698759',
id: '1216352305750736956',
createdTimestamp: 1710071388424,
type: 0,
system: false,
content: '@Violet',
author: User {
id: '856956452740792320',
bot: false,
system: false,
flags: [UserFlagsBitField],
username: 'ivioleti',
globalName: 'Violet',
discriminator: '0',
avatar: 'a1c7fdbf18258cf177318958181cebb4',
banner: null,
accentColor: null,
avatarDecoration: null
},
pinned: false,
tts: false,
nonce: null,
embeds: [],
components: [],
attachments: Collection(2) [Map] {
'1216352306090737715' => [Attachment],
'1216352306598117437' => [Attachment]
},
stickers: Collection(0) [Map] {},
position: 0,
roleSubscriptionData: null,
resolved: null,
editedTimestamp: null,
reactions: ReactionManager { message: [Circular *1] },
mentions: MessageMentions {
everyone: false,
users: [Collection [Map]],
roles: Collection(0) [Map] {},
_members: null,
_channels: null,
_parsedUsers: null,
crosspostedChannels: Collection(0) [Map] {},
repliedUser: null
},
webhookId: null,
groupActivityApplication: null,
applicationId: null,
activity: null,
flags: MessageFlagsBitField { bitfield: 0 },
reference: null,
interaction: null
}
}message.mentions.users.size> 0message.mentions if (message.mentions.users.size > 0) {
^
TypeError: Cannot read properties of undefined (reading 'users')
at Timeout._onTimeout (/home/container/Events/Client/thread.js:65:38)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v21.5.0async execute(thread) {
if (thread.parent.id === '1139062893573328966') {
const channel = thread.guild.channels.cache.get(
'1014042418074624071',
)
const Ch_Log = thread.guild.channels.cache.get(
'1202976505542615140',
)
const length = ['First Strike', 'Second Strike', 'Third Strike']
//IDK WHAT THE FUCK IS THIS PART
const messages2 = await thread.messages.fetch()
const messages1 = await thread.messages.fetch({
limit: 1,
after: thread.id,
})
//IDK WHAT THE FUCK IS THIS PART
const message = await thread.messages.fetch({
limit: 1,
after: 0,
})
console.log(message)
}
} const messages = await thread.messages.fetch({
limit: 1,
after: 0,
})
const message = messages.first()