Skip to content

Receiving and replying to messages

Sending messages can be done with the REST helper, and if you wish to do the same as a reply in discord you can use message_reference

1
import {
2
createClient,
3
Intents
4
} from "lilybird";
5
6
await createClient({
7
token: process.env.TOKEN,
8
intents: [Intents.GUILDS],
9
listeners: {
10
messageCreate: async (client, message) => {
11
await client.rest.createMessage(message.channel_id, {
12
content: "Hii~",
13
message_reference: { message_id: message.id }
14
});
15
}
16
}
17
});