$ban
Allows you to ban a user from a guild. 3rd field may be optional with a reason.

FUNCTION USAGE

  • $ban[userID]
  • $ban[userID;guildID]
  • $ban[userID;guildID;reason]

Properties:

userID - ID of the user to ban. guildID - The ID of the guild where you want the ban to happen. reason - Optional reason that logs in the audit log.
If the provided user ID isn't valid, the ban action won't work.

Example 1: Basic example without reason

1
bot.Command({
2
name: "ban",
3
code: `
4
$ban[$mentioned[1]]
5
6
$username banned $tag[$mentioned[1]]
7
`
8
})
Copied!

Example 2: Basic example with reason

1
bot.Command({
2
name: "ban",
3
code: `
4
$ban[$mentioned[1];$guildID;$messageSlice[>1]]
5
6
$username banned $tag[$mentioned[1]]
7
Reason: $messageSlice[>1]
8
`
9
})
Copied!
Last modified 4mo ago
Copy link
Contents
Properties: