Vergebene XP für Nachrichten und Reaktionen pro Stunde begrenzen #168 #176

Merged
edraft merged 6 commits from #168 into 0.3.1 2023-01-13 22:47:13 +01:00
Showing only changes of commit d91ff392ca - Show all commits

View File

@ -1,6 +1,7 @@
from typing import Callable
import discord
from bot_data.abc.user_joined_voice_channel_abc import UserJoinedVoiceChannelRepositoryABC
from cpl_core.configuration import ConfigurationABC
from cpl_core.database.context import DatabaseContextABC
from cpl_core.logging import LoggerABC
@ -20,8 +21,6 @@ from bot_data.abc.user_message_count_per_hour_repository_abc import UserMessageC
from bot_data.model.user import User
from bot_data.model.user_message_count_per_hour import UserMessageCountPerHour
from modules.base.configuration.base_server_settings import BaseServerSettings
from bot_data.abc.user_joined_voice_channel_abc import UserJoinedVoiceChannelRepositoryABC
from bot_data.model.user import User
class ClientUtilsService(ClientUtilsABC):
@ -156,7 +155,7 @@ class ClientUtilsService(ClientUtilsABC):
if is_reaction:
umcph.xp_count += settings.xp_per_reaction
else:
umcph.xp_count += settings.xp_per_reaction
umcph.xp_count += settings.xp_per_message
self._umcphs.update_user_message_count_per_hour(umcph)
self._db.save_changes()