Browse Source

count messages

master
Hendrik Langer 2 years ago
parent
commit
de9c32359d
  1. 4
      matrix_pygmalion_bot/core.py

4
matrix_pygmalion_bot/core.py

@ -175,7 +175,9 @@ class Callbacks(object):
await self.bot.send_message(self.client, room.room_id, translated_answer, reply_to=chat_message.event_id, original_message=answer) await self.bot.send_message(self.client, room.room_id, translated_answer, reply_to=chat_message.event_id, original_message=answer)
else: else:
await self.bot.send_message(self.client, room.room_id, answer, reply_to=chat_message.event_id) await self.bot.send_message(self.client, room.room_id, answer, reply_to=chat_message.event_id)
if not "message_count" in self.room_config[room_id]:
self.room_config[room_id]["message_count"] = 0
self.room_config[room_id]["message_count"] += 1
async def invite_cb(self, room: MatrixRoom, event: InviteEvent) -> None: async def invite_cb(self, room: MatrixRoom, event: InviteEvent) -> None:

Loading…
Cancel
Save