You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe connection.names() sends the command to the server, you probably need to make use of the "namreply" event to get the reply.
If you are using the SingleServerIRCBot or the SimpleIRCClient class, you can just add
def on_namreply(self, connection, event):
#code here
to your code
Otherwise (if you're using the Reactor class) you probably gotta use add_global_handler() on a ServerConnection object:
e.g
def yourmethodnamehere(self, connection, event):
#code here
x = irc.client.Reactor()
y = x.server()
y.add_global_handler("namreply", yourmethodnamehere)
y.connect(serverhere, porthere, nickhere)
P.S i assume connection.names() takes the channel name as an argument but i'm not sure.
P.S 2 You may need to use connection.names() within the on_join event cause i'm not sure that by calling it right after doing connection.join("#chan") there is enough time for the client to join #chan. In other words you might be sending NAMES too soon, before actually joining the channel.
Im trying
connection.names()
after I join the channel (run the join function) but its returning NoneThe text was updated successfully, but these errors were encountered: