Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Update verify-lobby.py

Open mzamini92 opened this issue 1 year ago • 1 comments

Use discord.Client.fetch_channel instead of discord.utils.get to get the lobby channel object. This is a more efficient way to get a channel object by ID or name.

Use discord.Role objects instead of role names to check for roles. This is more reliable and efficient, and avoids potential issues with multiple roles having the same name.

Use async with to properly clean up the tqdm progress bar after it's done.

Use the message.author.top_role attribute instead of iterating over all roles to check for the unverified role. This is more efficient, and avoids potential issues with multiple roles having the same name.

mzamini92 avatar Apr 23 '23 14:04 mzamini92

I think this script is no longer used. cc @yk

notmd avatar Apr 28 '23 13:04 notmd