πŸŸͺpart

The part method allows the bot to leave a specific IRC channel.

Syntax

bot.part(channel, message);

Parameters

  • channel (string, required) – The IRC channel the bot should leave (e.g., #channelname).

  • message (string, optional) – A farewell message to display when leaving the channel.

Example Usage

Leave a channel with a custom message:

bot.part('#YOUR-CHANNEL', 'Im done.');

Leave a channel without a custom message:

bot.part('#YOUR-CHANNEL');

Notes

  • Ensure the channel name starts with #.

  • The bot must be in the channel to part from it.

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

  • Some IRC networks may require additional permissions to leave a channel.

Last updated