A-0.3 - Basismodul #36

Merged
edraft merged 48 commits from 0.3 into Alpha 2021-12-27 18:17:42 +01:00
Showing only changes of commit e3ac78f97b - Show all commits

View File

@ -39,7 +39,7 @@ class MessageService(MessageServiceABC):
except Exception as e:
self._logger.error(__name__, f'Deleting message failed', e)
else:
self._clients.apppend_deleted_message_count(self._bot.user.id, guild_id)
self._clients.apppend_deleted_message_count(self._bot.user.id, guild_id, 1)
self._db.save_changes()
self._logger.info(__name__, f'Deleted message {message}')
@ -52,7 +52,7 @@ class MessageService(MessageServiceABC):
self._logger.error(__name__, f'Send message to channel {channel.id} failed', e)
else:
self._logger.info(__name__, f'Sent message to channel {channel.id}')
self._clients.apppend_sent_message_count(self._bot.user.id, channel.guild.id)
self._clients.apppend_sent_message_count(self._bot.user.id, channel.guild.id, 1)
self._db.save_changes()
await self.delete_message(msg)
@ -63,7 +63,7 @@ class MessageService(MessageServiceABC):
except Exception as e:
self._logger.error(__name__, f'Send message to user {receiver.id} failed', e)
else:
self._clients.apppend_sent_message_count(self._bot.user.id, receiver.guild.id)
self._clients.apppend_sent_message_count(self._bot.user.id, receiver.guild.id, 1)
self._db.save_changes()
self._logger.info(__name__, f'Sent message to user {receiver.id}')
@ -84,6 +84,6 @@ class MessageService(MessageServiceABC):
self._logger.error(__name__, f'Send message to channel {ctx.channel.id} failed', e)
else:
self._logger.info(__name__, f'Sent message to channel {ctx.channel.id}')
self._clients.apppend_sent_message_count(self._bot.user.id, ctx.guild.id)
self._clients.apppend_sent_message_count(self._bot.user.id, ctx.guild.id, 1)
self._db.save_changes()
await self.delete_message(msg)