$kickMention
$kickMention targets the first user mention in the triggering message. The reason argument is optional.
Syntax
$kickMention[reason]
The argument is optional: the bare form $kickMention kicks the first mentioned user without a reason, like $kickMention[].
Examples
Prefix command example
Configure a prefix command named kick. Invoke it as !kick @member.
$nomention
$onlyPerms[kickmembers;You need Kick Members permission.]
$onlyBotPerms[kickmembers;The bot needs Kick Members permission.]
$onlyIf[$mentioned[1]!=;Usage: !kick @member]
$onlyIf[$mentioned[1]!=$authorID;You cannot kick yourself.]
$onlyIf[$mentioned[1]!=$serverOwner;The server owner cannot be kicked.]
$kickMention[Rules violation]
Member kicked successfully.
A missing mention fails target validation, with or without a reason (“Missing or invalid user ID.”). The reason is limited to 512 characters. Before kicking, the engine checks that the command author has the Kick Members permission; if not, an error is raised. The bot also needs Kick Members, and its highest role must be above the target’s highest role (the server owner cannot be kicked). To supply a user ID explicitly, use $kick[userID;reason].
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.