0
我有一個超級簡單的IRC機器人,基本上連接到一個頻道,當有人說「你好機器人」它應該說「你好」在頻道然後退出。然而,雖然我能夠讓它退出,但機器人並不打招呼。錯誤當試圖讓一個Python的irc機器人發送一條消息到頻道
它爲「Hello」發送到通道中的代碼如下:
s.send('PRIVMSG #test :%s\r\n' %s (MESSAGE))
我收到的錯誤是:
Traceback (most recent call last):
File "defaultbot.py", line 40, in <module>
s.send('PRIVMSG #test :%s\r\n' %s (MESSAGE))
TypeError: '_socketobject' object is not callable
我使用的腳本是相當短我希望直截了當:
看來,你的pastebin鏈接已損壞。 – Maehler