Skip to content

📌 Red Cog Approval #45

@coffeebank

Description

@coffeebank

https://cogboard.discord.red/t/coffee-cogs/1259


General

  • Consider using TitleCase instead of Titlecase casing for your class names to maintain consistency with how users expect to get [p]help for 3rd party cogs.

    • Response:
      ⏳ In progress. Currently, the name for most cogs are stylized in lowercase (or first letter capitalized). This may change.
  • 📝 Several of your cogs use requests (or urllib.requests), which is a blocking way to make HTTP requests. You should instead use aiohttp (as several of your cogs do) to make HTTP requests in an asynchronous way.

    • Response:
      ⏳ In progress. Due to previous changes to the webhook API, all async webhooks were migrated to SyncWebhook as a patch, which depended on requests and is blocking. However, it seems async webhook is now fixed. Migration back to async webhook is planned.
  • 📝 Some cogs have requests in their requirements, despite it not being used.

    • Response:
      ⏳ In progress. After migration back to async webhooks is completed, requests will be removed from requirements.
  • Some cogs have aiohttp and asyncio in their requirements. Those libraries are already requirements of Red, so listing them is not necessary.

    • Response:
      ⏳ In progress.
  • Despite some cogs including it, permissions is not a valid info.json key, and including it will not resolve the need to add proper permissions checking to commands.

    • Response:
      ⏳ In progress.
  • You have bare except blocks in a few places. Consider at least replacing them with except Exception, to avoid catching standard control errors like the one generated by CTRL+Cing. Ideally, identify the error you actually intend to catch and use that instead (generally discord.HTTPException is a good bet for Discord API calls).

    • Response:
      ⏳ In progress.
  • Consider checking the response.status in your aiohttp requests in case the URL requested goes offline or has an error.

    • Response:
      ⏳ In progress.
  • Your cogs don’t have internal consistency between [p] < cog > set (ie [p]barset) and [p]set < cog > (ie [p]setwebsearch).

    • Response:
      ⏳ In progress. Standardizing on [p]set < cog > .
  • [ℹ️] Consider using await ctx.tick() instead of a manual add_reaction call in places where you are just adding a checkmark to the invoking message.

    • Response:
      Potentially delayed to next refactor/code cleanup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions