Describe the bug
I am trying to make a bot that uses local events in the code in order to send bot commands. To give an example, if the clock hits a certain date, the bot sends a message to remind people of someone's birthday.
However, I was not able to use code outside of the listeners for doing this properly.
Most of the listener class only pays attention to Matrix events and I was not able to figure out how to use the more arbitrary on_startup listener or the on_custom_event ones.
Another part of the problem is that I don't know if it is possible to get things like a room's id without using one of the listeners.
I thought of a few solutions depending on what's the case:
- Solving my problem is possible with existing tools. Updating the documentation with the trick would be massively useful for everyone (or just answering here could do)
- Adding a listener that can read from some condition that happens locally that's not startup (like a timer, or a boolean)
Sorry if I missed something obvious lol...
Desktop:
- OS: CachyOS Linux 6.18.3-2-cachyos-lts
- Python Version: 3.10
- Package Version 2.12.3
**Describe the bug**
I am trying to make a bot that uses local events in the code in order to send bot commands. To give an example, if the clock hits a certain date, the bot sends a message to remind people of someone's birthday.
However, I was not able to use code outside of the listeners for doing this properly.
Most of the listener class only pays attention to Matrix events and I was not able to figure out how to use the more arbitrary on_startup listener or the on_custom_event ones.
Another part of the problem is that I don't know if it is possible to get things like a room's id without using one of the listeners.
I thought of a few solutions depending on what's the case:
1) Solving my problem is possible with existing tools. Updating the documentation with the trick would be massively useful for everyone (or just answering here could do)
2) Adding a listener that can read from some condition that happens locally that's not startup (like a timer, or a boolean)
Sorry if I missed something obvious lol...
**Desktop:**
- OS: CachyOS Linux 6.18.3-2-cachyos-lts
- Python Version: 3.10
- Package Version 2.12.3