Skip to content
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

Merged
merged 3 commits into from
Jul 16, 2024
Merged

bug fixes + readme #3

merged 3 commits into from
Jul 16, 2024

Conversation

An3loN
Copy link
Collaborator

@An3loN An3loN commented Jul 16, 2024

guild_only -> contexts
new chapter about bot setup in readme
bug fixes
dependencies updated

@An3loN An3loN requested a review from MaHryCT3 July 16, 2024 07:15
@@ -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:
Copy link
Owner

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вроде еще хотели же обязательным сделать поле default_factory

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

на сколько я помню проблема в том что тупа не ставится значение параметру
может просто по умолчанию даже None ставить

@MaHryCT3
Copy link
Owner

а еще можешь избавиться от Singleton, просто создай в этой же файле инстанс и пусть лучше он импортится по всем файликам

@An3loN An3loN force-pushed the dev branch 3 times, most recently from c7029d9 to 2675e4d Compare July 16, 2024 12:40
@MaHryCT3 MaHryCT3 merged commit 2a1ef2f into main Jul 16, 2024
1 check passed
@MaHryCT3 MaHryCT3 deleted the dev branch July 16, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants