ban
The ban
method allows the bot to ban a specific user from an IRC channel.
Syntax
Parameters
channel
(string, required) – The IRC channel from which the user should be kicked (e.g., #channelname).userinfo
(string, required) – User/Host to add a Mode +b.
Example Usage
Kick a user from a channel with a custom message:
Notes
Ensure the channel name starts with
#
.The bot must have sufficient permissions (usually operator or higher) to set mode on a user from the channel.
Some IRC networks may require additional permissions or an IRC operator role.
The user must be present in the channel to be banned.
4o mini
Last updated