aboutsummaryrefslogtreecommitdiffstats
path: root/botstrap.py
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2023-08-11 15:55:20 +0100
committerGravatar GitHub <[email protected]>2023-08-11 15:55:20 +0100
commit14b01397684162f3e82dd3703c0bed531a77eb5a (patch)
tree2c21b0eeff30bf56816ec6f501e5e27f19ea6de4 /botstrap.py
parentMerge pull request #2710 from python-discord/dependabot/pip/ruff-0.0.283 (diff)
parentDon't use a BaseSettings instance for constants that don't need to be overwri... (diff)
Merge pull request #2695 from python-discord/pydantic-v2
Migrate to Pydantic v2
Diffstat (limited to 'botstrap.py')
-rw-r--r--botstrap.py6
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(