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
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 3d01c9f798 - Show all commits

@ -1 +1 @@
Subproject commit 28bd879dab2e5ea6ca8bb38e44c7786eb67cb7a2
Subproject commit 54b1b3860cb570d29c8ba2590dd082a1fa744265

View File

@ -14,6 +14,7 @@ class BaseServerSettings(ConfigurationModelABC):
self._max_voice_state_hours: int = 0
self._xp_per_message: int = 0
self._xp_per_reaction: int = 0
self._max_message_xp_per_hour: int = 0
self._xp_per_ontime_hour: int = 0
self._afk_channel_ids: List[int] = List(int)
self._afk_command_channel_id: int = 0
@ -37,6 +38,10 @@ class BaseServerSettings(ConfigurationModelABC):
def xp_per_reaction(self) -> int:
return self._xp_per_reaction
@property
def max_message_xp_per_hour(self) -> int:
return self._max_message_xp_per_hour
@property
def xp_per_ontime_hour(self) -> int:
return self._xp_per_ontime_hour
@ -67,6 +72,7 @@ class BaseServerSettings(ConfigurationModelABC):
self._max_voice_state_hours = int(settings['MaxVoiceStateHours'])
self._xp_per_message = int(settings['XpPerMessage'])
self._xp_per_reaction = int(settings['XpPerReaction'])
self._max_message_xp_per_hour = int(settings['MaxMessageXpPerHour'])
self._xp_per_ontime_hour = int(settings['XpPerOntimeHour'])
for index in settings['AFKChannelIds']:
self._afk_channel_ids.append(int(index))