$ban

Bans a user from the server

Usage:

$ban[userID;reason;messages to delete (in days)]

If member can be banned by the bot:

Discord Moderator09/25/2022
!!exec $ban[$findMember[Unknown User];Spamming;10]

If member can NOT be banned by the bot Read Below why

Discord Moderator09/25/2022
!!exec $ban[$ownerID;I'm a bad moderator;10]
Custom Command Bot 09/25/2022
❌ Failed to ban undefined!

Why can't the bot ban a member?

It could be, that your bot role, is below the member role!

Discord prevents users (members/bots) from banning members above their highest role

Be really careful with adding this to a command!

EVERY member that can execute the command, this function is added in. Will be able to BAN everyone below the bot role!

We highly suggest, not putting the bot role above "Admin" and "head moderator"

Related Functions

$kick, to kick a member instead of banning him/here

$unban, to unban a member,which is banned

Function difficulty: Medium
Tags: ban punish member moderation moderator