Fixed on message for new member #481
This commit is contained in:
parent
2bb22c0297
commit
3abd145ce2
@ -50,7 +50,9 @@ class AchievementOnMessageEvent(OnMessageABC):
|
||||
return
|
||||
|
||||
server = self._servers.get_server_by_discord_id(message.guild.id)
|
||||
user = self._users.get_user_by_discord_id_and_server_id(message.author.id, server.id)
|
||||
user = self._users.find_user_by_discord_id_and_server_id(message.author.id, server.id)
|
||||
if user is None:
|
||||
return
|
||||
|
||||
user.message_count += 1
|
||||
self._users.update_user(user)
|
||||
|
@ -86,6 +86,11 @@ class BaseOnMessageEvent(OnMessageABC):
|
||||
if message is None or message.guild is None:
|
||||
return
|
||||
|
||||
server = self._servers.get_server_by_discord_id(message.guild.id)
|
||||
user = self._users.find_user_by_discord_id_and_server_id(message.author.id, server.id)
|
||||
if user is None:
|
||||
return
|
||||
|
||||
self._logger.info(__name__, f"Received message: {LogMessageHelper.get_log_string(message)}")
|
||||
self._append_received_message_count(message.guild.id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user