mirror of
https://github.com/mightyBroccoli/xmpp-chatbot.git
synced 2024-11-09 20:41:25 +01:00
fix bot for latest slixmpp changes
This commit is contained in:
parent
9c3f6761e5
commit
4458a18258
3 changed files with 7 additions and 4 deletions
|
@ -42,4 +42,4 @@ Copy the systemd dummy file into systemd service folder.
|
|||
If it is neccecary to start the bot automatically when the system boots do `systemctl enable magicbot.service`.
|
||||
|
||||
#### starting the bot without systemd
|
||||
Got to the bots directory and run `./main.py &`.
|
||||
Go to the bots directory and run `./main.py &`.
|
5
main.py
5
main.py
|
@ -55,7 +55,10 @@ class QueryBot(slixmpp.ClientXMPP):
|
|||
if self.room:
|
||||
for rooms in self.room.split(sep=","):
|
||||
logging.debug("joining: %s" % rooms)
|
||||
self.plugin['xep_0045'].join_muc(rooms, self.nick, wait=True)
|
||||
# join_muc will be deprecated in slixmpp 1.8.0
|
||||
# see https://slixmpp.readthedocs.io/en/latest/api/plugins/xep_0045.html?highlight=join_muc_wait#slixmpp.plugins.xep_0045.XEP_0045.join_muc_wait
|
||||
# self.plugin['xep_0045'].join_muc_wait(rooms, self.nick, maxstanzas=0)
|
||||
self.plugin['xep_0045'].join_muc(rooms, self.nick)
|
||||
|
||||
async def message(self, msg):
|
||||
"""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
slixmpp>=1.2.2
|
||||
slixmpp>=1.7.1
|
||||
defusedxml>=0.5.0
|
||||
requests>=2.19.1
|
||||
validators>=0.12.2
|
Loading…
Reference in a new issue