K
Docs
API ReferenceEvent TypesMessage sent
💬

Message sent

messageCreateMESSAGE_CREATETrigger

Fires 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.

💬
Message sent
messageCreate
Trigger
Filters
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 channel

Available sparks

Use these in any piece config field inside flows triggered by this event.

SparkTypeDescription
{{input.guild.id}}stringYour Discord server's unique ID
{{input.guild.name}}stringYour server's name
{{input.guild.memberCount}}stringHow many members are in the server
{{message.id}}stringThe message's unique ID
{{message.content}}stringThe full text of the message
{{message.channelId}}stringID of the channel the message was sent in
{{message.author.id}}stringDiscord ID of who sent the message
{{message.author.username}}stringSender's Discord username
{{message.author.displayName}}stringSender's display name in this server (nickname or username)
{{message.author.name}}stringSender's username (alias for message.author.username)
{{channel.id}}stringID of the channel (same as message.channelId)
{{channel.name}}stringName of the channel

Filters

Configure these in the trigger's filter panel to narrow when the flow fires.

FilterTypeDescription
ignoreBotsbooleanSkip 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}}
});