aboutsummaryrefslogtreecommitdiffstats
path: root/botstrap.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-07-25 15:21:02 +0100
committerGravatar Chris Lovering <[email protected]>2023-08-11 15:53:26 +0100
commit292fba7c58b24df30f7631290bfecdbbd74da141 (patch)
tree8d29c9c4e53f795e16a2b5a6f4a77c588e205fd4 /botstrap.py
parentUse new Pydantic v2 logic for constant loading (diff)
Replace deprecated functions with new pydantic v2 functions
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(