Discord Name: Vexed#3211
GitHub Repository (Must be V3):
Description: A collection of utility-based cogs.
I think everything should be pretty stable, but no promises :awesome:
Discord Name: Vexed#3211
GitHub Repository (Must be V3):
Description: A collection of utility-based cogs.
I think everything should be pretty stable, but no promises :awesome:
Hi Vexed (Vexed#3211), thank you for your patience while I review your repo.
Commit hash at time of review - 07dc898e2678e13d03e9eaec46bda7961d047ded
$schema
is not a valid key for info.json (Optional)bot.loop.create_task
is preferred over asyncio.create_task
. (Optional)discord.PartialEmoji
and discord.Colour
as they have built in converters in discord.py to help cleanup a lot of your logic inside the commands. When PartialEmoji
encounters a regular string though to solve that you can try adding a reaction to the ctx.message and if that fails you know it was not a valid emoji to use. (Optional)$schema
is not a valid key for info.json (Optional)$schema
is not a valid key for info.json (Optional)self.config.register_global(version=1, cog_loaded=default, connected=default, first_load=None)
await self.config.clear()
. (Optional)$schema
is not a valid key for info.json (Optional)$schema
is not a valid key for info.json (Optional)install_msg
: “once you loaded” → “once loaded.” or “once you load it.” (Optional)end_user_data_statement
: “This cog does may” → “This cog may”. (Optional)$schema
is not a valid key for info.json (Optional)$schema
is not a valid key for info.json (Optional)$schema
is not a valid key for info.json (Optional)bot.loop.create_task
is preferred over asyncio.create_task
. (Optional)$schema
is not a valid key for info.json (Optional)$schema
is not a valid key for info.json (Optional)disabled
key in the info.json so that downlaoder knows to avoid it and ignore it.author
is missing from info.jsoninstall_msg
is missing from info.jsonend_user_data_statement
is a requirement for data API and EUD compliance. (Optional)$schema
is not a valid key for info.json (Optional)$schema
is not a valid key for info.json (Optional)The only major issues I have are how telemetry is handled on cog unload. Most other issues are superficial or require minor changes.
Hey Trusty,
Thanks for such a detailed review. I have addressed most individual cog feedback, but not the reloading of vex-cog-utils, the VexTelemetry cog or telemetry on unload.
Sentry has been an interesting experiment and was fun to learn. However, on reflection, it does not pick up many errors at all and adds a decent chunk of code to each cog, even the simple ones. Therefore I think it’s best to remove it completely, especially as my cogs move to a less technical user base after approval, of which I feel it is more morally questionable as to whether telemetry (even opt-in) is acceptable.
Publishing vex-cog-utils as a PyPi package was also a nice thing to learn. However, I had not considered your point about different cogs on different versions. Hot reloading is in a way required as it is a better solution than having to do a bot restart each time. I think that the best way to do this would be to do utils PCX Cogs-style where it’s a single file (or folder?) which is copied to each cog - which I would want to automate, so that’s something to learn.
I have decided to keep the $schema
key in my info.json
.
Per-cog notes:
So, this is mainly me noting down where I’m at and not necessarily something you need to respond to. Please do not approve me until I have removed Sentry, which I think will just leave reloading of Vex-Cog-Utils which I will fix as described above later on. Depending on how important you think reload issues with Vex-Cog-Utils are, I would be happy to be approved once Sentry has been removed, though I am also equally happy to wait.
Thank you again for taking time to review my cogs.
Hey Trusty,
The feedback which I hadn’t previously addressed as noted in the previous post has now been fixed in the last few commits and if there’s anything else please do let me know.
Hi Vexed, thanks for making those changes. I am still not 100% on the asserts in the code, if you want to prevent a command from executing until the init is fully complete you might look at creating an asyncio.Event() that is set only once all initialization is complete rather than potentially throwing ugly errors at people who will not understand why if ctx.guild
is something completely different than a discord.Guild
object and is also not None
. Regardless I will be marking this as approved.