made config immutable

This commit is contained in:
Specoolazius 2022-03-30 21:46:20 +02:00
parent 11577b8be1
commit 3dce5ec623

View File

@ -102,7 +102,19 @@ class Client(discord.Bot, ABC):
Starts the bot and automatically gets the configured token.
"""
super(Client, self).run(self.__config.auth_token)
super(BotClient, self).run(self.__config.auth_token)
@property
def config(self) -> Configs:
"""< property >
The default config should not be changeable even on runtime.
This ensures its read-only.
:return: Butter default config
"""
return self.__config
@property
def color(self) -> int: