diff options
author | 2024-03-17 23:14:26 +0200 | |
---|---|---|
committer | 2024-03-17 23:14:26 +0200 | |
commit | d4d8e6d0af376e32112512a3726df8f1449deb01 (patch) | |
tree | e3f4c4f53ca17c6129b586e167dfa83e1c2cf51d /botstrap.py | |
parent | Make the moderator the author of the compban for phishing attempts (diff) | |
parent | Merge pull request #2953 from python-discord/dependabot/pip/pytest-8.1.1 (diff) |
Merge branch 'main' into phishing_button
Diffstat (limited to 'botstrap.py')
-rw-r--r-- | botstrap.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/botstrap.py b/botstrap.py index c57a254a3..7a9d94d8b 100644 --- a/botstrap.py +++ b/botstrap.py @@ -176,7 +176,7 @@ with DiscordClient(guild_id=GUILD_ID) as discord_client: all_roles = discord_client.get_all_roles() - for role_name in _Roles.__fields__: + for role_name in _Roles.model_fields: role_id = all_roles.get(role_name, None) if not role_id: @@ -209,7 +209,7 @@ with DiscordClient(guild_id=GUILD_ID) as discord_client: python_help_channel_id = discord_client.create_forum_channel(python_help_channel_name, python_help_category_id) all_channels[PYTHON_HELP_CHANNEL_NAME] = python_help_channel_id - for channel_name in _Channels.__fields__: + for channel_name in _Channels.model_fields: channel_id = all_channels.get(channel_name, None) if not channel_id: log.warning( @@ -222,7 +222,7 @@ with DiscordClient(guild_id=GUILD_ID) as discord_client: config_str += "\n#Categories\n" - for category_name in _Categories.__fields__: + for category_name in _Categories.model_fields: category_id = all_categories.get(category_name, None) if not category_id: log.warning( |