πŸŸͺkick

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

Syntax

bot.kick(channel, user, message);

Parameters

  • channel (string, required) – The IRC channel from which the user should be kicked (e.g., #channelname).

  • user (string, required) – The nickname of the user to be kicked.

  • message (string, required) – A custom message to display when the user is kicked.

Example Usage

Kick a user from a channel with a custom message:

bot.kick('#testingpg', 'bad_user', 'You have been kicked for spamming.');

Kick a user from a channel without a custom message:

bot.kick('#testingpg', 'bad_user');

Notes

  • Ensure the channel name starts with #.

  • The bot must have sufficient permissions (usually operator or higher) to kick a user from the channel.

  • Some IRC networks may require additional permissions or an IRC operator role to kick a user.

  • If no message is provided, the default IRC server message will be used.

  • The user must be present in the channel to be kicked.

  • Depending on the bot’s status (e.g., being an operator or admin in the channel), it may be allowed to kick other users.

4o mini

Last updated