This adds a websocket listener for the Pythonista API.
To run this you must provide a Pythonista API Application token in the config that has websocket permissions.
Currently the only event this websocket subscribes to is discord_py_mod_log. When that event is received, a bot event via bot.dispatch is dispatched: on_papi_dpy_modlog which takes in one parameter, the payload data received from the API, without the op/user_id fields.
In the event that the Pythonista API is disconnected for some reason this will try to connect with an Expotential Backoff, unless the token is refused.
This adds a websocket listener for the Pythonista API.
To run this you must provide a Pythonista API Application token in the config that has websocket permissions.
Currently the only event this websocket subscribes to is
discord_py_mod_log
. When that event is received, a bot event via bot.dispatch is dispatched:on_papi_dpy_modlog
which takes in one parameter, the payload data received from the API, without the op/user_id fields.In the event that the Pythonista API is disconnected for some reason this will try to connect with an Expotential Backoff, unless the token is refused.