Added max_message_xp_per_hour #168

This commit is contained in:
Sven Heidemann 2023-01-11 18:27:43 +01:00
parent 624625d4b5
commit 3d01c9f798
2 changed files with 7 additions and 1 deletions

@ -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))