python-matrix-bot-api
python-matrix-bot-api copied to clipboard
example_bot.py Hi command floods forever
I just tested the example bot with a direct chat and said "Hi".
It replied with
Hi, @<my_id>:matrix.org Hi, @<bot's_own_id>:matrix.org Hi, @<bot's_own_id>:matrix.org Hi, @<bot's_own_id>:matrix.org Hi, @<bot's_own_id>:matrix.org
.. forever until I stopped the bot.
Did you properly set the username in example_bot.py?
The bot filters out its own messages from triggering handlers by checking to see if the message was sent by the username that the MatrixBotAPI instance was constructed with.
I set it as the matrix id (@<bot's_own_id>:matrix.org) .. should it be the full ID or just the username part without homeserver?
It should just be the username (w/o server). Perhaps this should be clarified in the documentation