Fix Path().is_dir() usage.
This commit is contained in:
@@ -396,7 +396,7 @@ async def update_clan_messages(guild: nextcord.Guild, channel_updates: Sequence[
|
|||||||
guild (nextcord.Guild): Guild object that all channels and messages belong to.
|
guild (nextcord.Guild): Guild object that all channels and messages belong to.
|
||||||
channel_updates: (Sequence[str]): a sequence of the channels to update.
|
channel_updates: (Sequence[str]): a sequence of the channels to update.
|
||||||
"""
|
"""
|
||||||
dirs = [dir_name for dir_name in channel_updates if Path.is_dir(f"{MESSAGES_DIR}/{dir_name}")]
|
dirs = [dir_name for dir_name in channel_updates if Path(f"{MESSAGES_DIR}/{dir_name}").is_dir()]
|
||||||
|
|
||||||
with Session(engine) as session:
|
with Session(engine) as session:
|
||||||
for dir_name in dirs:
|
for dir_name in dirs:
|
||||||
|
|||||||
Reference in New Issue
Block a user