Fetch message on specific channel #327
Answered
by
NekoCyan
gunawans67
asked this question in
Q&A
-
how to fetch message on specific channel |
Beta Was this translation helpful? Give feedback.
Answered by
NekoCyan
Sep 26, 2022
Replies: 2 comments 3 replies
-
wen i trying to using code from selfbot v11 get error
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Try this one. let channel = client.channels.cache.get("channel_id");
const fetched = await channel.messages.fetch({ limit: 2 });
let lastMessage = fetched.toJSON()[0]; For more Informations: TextChannel.messages. Or you can Use TextChannel.lastMessage to get Last Message without fetch (If you had cached it before or idk if it's needed to be catch XD). |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
gunawans67
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this one.
For more Informations: TextChannel.messages.
Or you can Use TextChannel.lastMessage to get Last Message without fetch (If you had cached it before or idk if it's needed to be catch XD).