💬
Message sent
messageCreateMESSAGE_CREATETriggerFires when a message is sent in a channel the bot can see.
When to use this
- →Auto-moderation
- →Keyword replies
- →Logging messages
On the canvas
This is what the trigger looks like in your bot's Triggers tab. The sparks listed are available in every node inside the linked flow.
💬Trigger
Message sent
messageCreateFilters
ignoreBots
true
Sparks in this flow
{{input.guild.id}}Your Discord server's unique ID{{input.guild.name}}Your server's name{{input.guild.memberCount}}How many members are in the server{{message.id}}The message's unique ID{{message.content}}The full text of the message{{message.channelId}}ID of the channel the message was sent in{{message.author.id}}Discord ID of who sent the message{{message.author.username}}Sender's Discord username{{message.author.displayName}}Sender's display name in this server (nickname or username){{message.author.name}}Sender's username (alias for message.author.username){{channel.id}}ID of the channel (same as message.channelId){{channel.name}}Name of the channelAvailable sparks
Use these in any piece config field inside flows triggered by this event.
| Spark | Type | Description |
|---|---|---|
{{input.guild.id}} | string | Your Discord server's unique ID |
{{input.guild.name}} | string | Your server's name |
{{input.guild.memberCount}} | string | How many members are in the server |
{{message.id}} | string | The message's unique ID |
{{message.content}} | string | The full text of the message |
{{message.channelId}} | string | ID of the channel the message was sent in |
{{message.author.id}} | string | Discord ID of who sent the message |
{{message.author.username}} | string | Sender's Discord username |
{{message.author.displayName}} | string | Sender's display name in this server (nickname or username) |
{{message.author.name}} | string | Sender's username (alias for message.author.username) |
{{channel.id}} | string | ID of the channel (same as message.channelId) |
{{channel.name}} | string | Name of the channel |
Filters
Configure these in the trigger's filter panel to narrow when the flow fires.
| Filter | Type | Description |
|---|---|---|
ignoreBots | boolean | Skip messages from bot accounts (default: true) |
📐
In TypeScript, this would be…
Not something you need to write — Kitcord registers these listeners automatically from your Kit.
TypeScript
client.on("messageCreate", (message) => {
if (message.author.bot) return;
// {{message.content}}, {{message.author.id}}, {{channel.id}}
});