πŸŸͺban

The ban method allows the bot to ban a specific user from an IRC channel.

Syntax

bot.ban(channel, userinfo);

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:

bot.ban('#testingpg', 'JohnDoe59@2001:818:df14:8c00:f08b:fad2:e1cd:63c5');

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