part
The part
method allows the bot to leave a specific IRC channel.
Syntax
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:
Leave a channel without a custom message:
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