I’m writing a bot that needs to read and post whispers.
Almost everything works as expected except bot doesn’t receive whispers.
At the moment the bot can read from and send messages to public channel. It also can send whispers to (at least) me, and I can confirm it by reading them in the browser. With the code below I can see messages from users in public channel in terminal but I don’t see whispers sent from user to bot there. I am not very familiar with IRC protocol, but I believe with the code below I am outputting everything that is sent to me. Unrelated code is removed from snippet.
s = socket.socket()
s.connect(('irc.chat.twitch.tv', 6667))
s.send(f'PASS {config.PASS}\r\n'.encode('utf-8'))
s.send(f'NICK {config.NICK}\r\n'.encode('utf-8'))
s.send(f'JOIN #{config.CHANNEL}\r\n'.encode('utf-8'))
# I can see both in the browser
utils.sendMessage(s, 'Public test') # in public chat
utils.sendPrivateMessage(s, config.CHANNEL, 'Private test') # in PM
while True:
response = s.recv(1024).decode('utf-8')
print(response) # prints public messages, but not whispers sent to bot
time.sleep(1)
Where should I look to fix this?
I’ve read all related threads here that I was able to find but it didn’t help.