-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug fixes + readme #3
Conversation
@@ -9,7 +9,7 @@ | |||
def get_member_locale(member: discord.Member, raise_exception: bool = False) -> LocaleEnum | None: | |||
roles_map = DynamicSettings().locale_roles | |||
for role in member.roles: | |||
if role.id in roles_map: | |||
if role and role.id in roles_map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут подпиши, что if role, это проблема либы, что там бывает None приходит
@@ -43,7 +43,7 @@ def cast_func(setting_value: dict): | |||
|
|||
|
|||
class DynamicSettings(metaclass=Singleton): | |||
find_friend_cooldown: int = SettingValue() | |||
find_friend_cooldown: int = SettingValue(default_factory=int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вроде еще хотели же обязательным сделать поле default_factory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
на сколько я помню проблема в том что тупа не ставится значение параметру
может просто по умолчанию даже None ставить
а еще можешь избавиться от Singleton, просто создай в этой же файле инстанс и пусть лучше он импортится по всем файликам |
c7029d9
to
2675e4d
Compare
guild_only -> contexts
new chapter about bot setup in readme
bug fixes
dependencies updated