A-0.3 - Basismodul #36
@ -39,7 +39,7 @@ class MessageService(MessageServiceABC):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._logger.error(__name__, f'Deleting message failed', e)
|
self._logger.error(__name__, f'Deleting message failed', e)
|
||||||
else:
|
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._db.save_changes()
|
||||||
self._logger.info(__name__, f'Deleted message {message}')
|
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)
|
self._logger.error(__name__, f'Send message to channel {channel.id} failed', e)
|
||||||
else:
|
else:
|
||||||
self._logger.info(__name__, f'Sent message to channel {channel.id}')
|
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()
|
self._db.save_changes()
|
||||||
await self.delete_message(msg)
|
await self.delete_message(msg)
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ class MessageService(MessageServiceABC):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._logger.error(__name__, f'Send message to user {receiver.id} failed', e)
|
self._logger.error(__name__, f'Send message to user {receiver.id} failed', e)
|
||||||
else:
|
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._db.save_changes()
|
||||||
self._logger.info(__name__, f'Sent message to user {receiver.id}')
|
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)
|
self._logger.error(__name__, f'Send message to channel {ctx.channel.id} failed', e)
|
||||||
else:
|
else:
|
||||||
self._logger.info(__name__, f'Sent message to channel {ctx.channel.id}')
|
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()
|
self._db.save_changes()
|
||||||
await self.delete_message(msg)
|
await self.delete_message(msg)
|
||||||
|
Reference in New Issue
Block a user