@@ -119,7 +119,6 @@ def guild_channels(self) -> list[dict[str, Any]]:
119119 self ._guild_channels = cast ("list[dict[str, Any]]" , response .json ())
120120 return self ._guild_channels
121121
122-
123122 @property
124123 def app_info (self ) -> dict [str , Any ]:
125124 """Fetches the application's information."""
@@ -169,11 +168,7 @@ def upgrade_server_to_community_if_necessary(
169168 self ._guild_info = self .patch (f"/guilds/{ self .guild_id } " , json = payload ).json ()
170169 log .info (f"Server { self .guild_id } has been successfully updated to a community." )
171170
172- def create_forum_channel (
173- self ,
174- channel_name_ : str ,
175- category_id_ : int | str | None = None
176- ) -> str :
171+ def create_forum_channel (self , channel_name_ : str , category_id_ : int | str | None = None ) -> str :
177172 """Creates a new forum channel."""
178173 payload = {"name" : channel_name_ , "type" : GUILD_FORUM_TYPE }
179174 if category_id_ :
@@ -258,7 +253,6 @@ def create_webhook(self, name: str, channel_id_: int) -> str:
258253 all_roles = discord_client .get_all_roles ()
259254
260255 for role_name in _Roles .model_fields :
261-
262256 role_id = all_roles .get (role_name , None )
263257 if not role_id :
264258 log .warning (f"Couldn't find the role { role_name } in the guild, PyDis' default values will be used." )
@@ -293,9 +287,7 @@ def create_webhook(self, name: str, channel_id_: int) -> str:
293287 for channel_name in _Channels .model_fields :
294288 channel_id = all_channels .get (channel_name , None )
295289 if not channel_id :
296- log .warning (
297- f"Couldn't find the channel { channel_name } in the guild, PyDis' default values will be used."
298- )
290+ log .warning (f"Couldn't find the channel { channel_name } in the guild, PyDis' default values will be used." )
299291 continue
300292
301293 config_str += f"channels_{ channel_name } ={ channel_id } \n "
@@ -306,9 +298,7 @@ def create_webhook(self, name: str, channel_id_: int) -> str:
306298 for category_name in _Categories .model_fields :
307299 category_id = all_categories .get (category_name , None )
308300 if not category_id :
309- log .warning (
310- f"Couldn't find the category { category_name } in the guild, PyDis' default values will be used."
311- )
301+ log .warning (f"Couldn't find the category { category_name } in the guild, PyDis' default values will be used." )
312302 continue
313303
314304 config_str += f"categories_{ category_name } ={ category_id } \n "
0 commit comments