matrix-gptbot/callbacks/sync.py
Kumi 5b500d34b5
Prepare for option to disable replying to everything
Automatically accept room invites on sync
Leave rooms if everyone else leaves
README update
!gptbot dice command
Minor fixes
2023-05-01 15:49:26 +00:00

8 lines
No EOL
249 B
Python

async def sync_callback(response, bot):
bot.logger.log(
f"Sync response received (next batch: {response.next_batch})", "debug")
SYNC_TOKEN = response.next_batch
bot.sync_token = SYNC_TOKEN
await bot.accept_pending_invites()