From 8ce98eb38cf529ffdb74b22286820fd3d1e0d3a7 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 13 Feb 2024 21:22:06 +0100 Subject: [PATCH] Actually they are called after updating IrcState --- develop/events.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/develop/events.rst b/develop/events.rst index f20b46f..f760a5e 100644 --- a/develop/events.rst +++ b/develop/events.rst @@ -37,10 +37,10 @@ You can catch commands directly with “do-methods”: when the bot receives a ``PRIVMSG``, all ``doPrivmsg`` methods are called; when it gets a ``437`` message, all ``do437`` methods are called, etc. -These methods are called **before** Limnoria updates its internal state; +These methods are called **after** Limnoria updates its internal state; so for example someone changes their nick from ``foo`` to ``bar`` (ie. ``:foo!~user@example.org NICK bar``), then ``doNick`` is called while -``irc.state.channels[...].users`` still contains ``foo`` and not ``bar``. +``irc.state.channels.[...].users`` already contains ``bar``. Those command take two arguments: an :ref:`Irc object ` and a :ref:`IrcMsg object `.