K
Docs
API ReferenceEvent TypesMember banned
🔨

Member banned

guildBanAddGUILD_BAN_ADDTrigger

Fires when a member is banned from a server.

When to use this
  • Logging bans
  • Notifying a mod-log channel

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.

🔨
Member banned
guildBanAdd
Trigger
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
{{ban.user.id}}Discord ID of the banned user
{{ban.user.username}}Username of the banned user
{{ban.reason}}Reason provided for the ban (may be empty)

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
{{ban.user.id}}stringDiscord ID of the banned user
{{ban.user.username}}stringUsername of the banned user
{{ban.reason}}stringReason provided for the ban (may be empty)
📐

In TypeScript, this would be…

Not something you need to write — Kitcord registers these listeners automatically from your Kit.

TypeScript
client.on("guildBanAdd", (ban) => {
  // {{ban.user.id}}, {{ban.reason}}
});