[REJECTED] AndyCogs

Discord Name: Andee#8552

GitHub Repository (Must be V3): https://github.com/AndyButAnnoying/AndyCogs

Description: Random Cogs that other people are too lazy too read. Check out the README.md for more info about the cogs

Hi Andy, thank you for your patience while I review your repo. I will preface this with this is not a full review as I will be rejecting your application.

Commit hash at time of review - a3045b1abcd72cb03621e8c25c63ad152002b1bc

afk

afk.py

  • Lines 26-48: You should really showcase where you get borrowed code from even if it’s slightly modified. This same code is used in cores economy which includes where that code came from including either one would have been acceptable.

info.json

  • min_bot_version being a dev version of Red will prevent anyone not using dev from installing and using this cog despite there being nothing in the cog actually requiring Red 3.4.6.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

applications

application.py

  • Lines 37-57: This function is not used anywhere. (Optional)
  • Lines 71, 83, 116: You should use await self.config.guild(ctx.guild).channel.clear() instead of setting the value to null so that config doesn’t have unnecessary null values stored. (Optional)
  • Lines 455-461: Your logic here of using ID’s vs position is incorrect. The position value is a number between 0 and the total number of roles in the server generally. You should be comparing roles rather than position or ID to ensure the hierarchy is respected.

info.json

  • min_bot_version being a dev version of Red will prevent anyone not using dev from installing and using this cog despite there being nothing in the cog actually requiring Red 3.4.6.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

danklogs

danklogs.py

  • Line 1: you import asyncio but never use it. (Optional)
  • Line 6: you import process from rapidfuzz but never use it. (Optional)

info.json

  • You are missing requirements unidecode and rapidfuzz which your cog currently requires to load.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

danktuils

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

freeloadermode

freeloadermode.py

  • Line 16: You listed “mo” as 30 weeks. I think you meant to do 86400 * 30 for 30 days. This will also never be reached since you’re checking time[-1] which would return o if “1 mo” was the input.
  • Line 72: You should be storing timezone aware timestamps ideally datetime.now().timestamp() instead of datetime.utcnow() because datetime.fromtimestamp() assumes the systems local time for a timestamp not utc. This will break on machines that aren’t set to utc time.
  • Lines 91 and 100: You have no checks if user is None which will error if the command is used without a user present since NoneType object has no attribute id.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

giveaways

api.py

Lines 38 and 64: It’s generally not a good idea to use regex to parse html see https://stackoverflow.com/a/1732454 . It can be used for limited and quick scopes of pages. However, this is very easy to break at any change from the owners wepage. I would recommend you utilize beautifulsoup which you have imported instead of regex for this. Furthermore this is unguarded meaning that a user can set their name to a valid regex pattern that will break this and potentially cause other problems. You should use re.escape(username) in order to not allow users with special regex characters in their name from causing errors.

converters.py

  • Lines 187-213: This is available in discord.py under the MessageConverter conveniently available with typhint discord.Message. (Optional)

giveaway.py

  • Lines 3, 4, 5, and 6: You import modules, timedelta, tasks, sleep_until, and API but never use them. (Optional)
  • Lines 265, 352, 366, 1326, 1337, 1354, 1651, and 1698: Your usage of utcnow() for storing timestamps isn’t ideal. Preferably use datetime.now() since datetime.fromtimestamp() assumes that the timestamp is in local time which it isn’t. As a result this can break on any systems not running on UTC time. (Optional)
  • Lines 1157-1226: Red has a built in utility to pagify large strings for you so you don’t have to split this up like you have. from redbot.core.utils.chat_formatting import pagify (Optional)

info.json

  • Requirements is missing mee6_py_api, beautifulsoup, unidecode, rapidfuzz.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

heist

info.json

  • Requirements is missing rapidfuzz and unidecode

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

murdermystery

info.json

  • There’s a lot of references to a cog called highlight in this info.json. You should clear that up.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

nqn

The entire premise of this cog is in violation of Discord TOS. While there’s no specific line that links this with the developer terms of service nor the regular user terms of service, consider that normally emojis from other servers is restricted to a paid service in the form of Discord Nitro. By enabling the service for free via utilizing a bot to simulate a message through a webhook you’re achieving two (2) things:

  • You’re removing Discords ability to collect accurate user information making Discord possibly liable in some situations for inaccurate representation of a user message. Meaning someone could make a legal case against Discord for not providing accurate information about said user and Discord would have to pay up because a users content was, unknowingly to discord, re-uploaded through a webhook. This would lead Discord to investigate and find your bot responsible and likely remove you from the platform.
  • You’re providing a paid service for free to users without their consent. Sure it looks good to you but the more people that do this either discord will remove the feature entirely or remove you from the platform. The feature only exists to support their announcement channels and allow all emojis to work via webhooks since that’s how announcements work.

As a result I ask that you remove this cog from your repository in its entirety.

suggestions

info.json

end_user_data_statement is missing from info.json (Optional)

  • end_user_data_statement is a requirement for data API and EUD compliance.

suggestions.py

  • Line 133: You convert an int or None to string here seems off meaning that if no number is provided then None is added to your list. I recommend not using Optional[int] and just doing async def who(self, ctx, number: int): This means if a number is not provided the help text for the command will be run instead.

__init__.py

  • Missing __red_end_user_data_statement__ which is required to be fully compliant with end user data declaration. (Optional)

Final thoughts, your giveaways cog is suspiciously neat compared to the rest of the cogs in this repo. While I couldn’t find any examples of this exact code anywhere else I didn’t spend a lot of time looking. You tend to make variables optional that don’t need to be, forcing you to create your own handling for them when you could make them non-optional and explain the requirements in the help string for the command. You create your own converters for things, which I like to see, but in a lot of cases I saw the same message converter you wrote which might be simplified by using the one built into discord.py.

After unanimous vote from the Cog Creator Organization we have decided to reject your application regardless of this review. Your behavior in the Red Discord server was unwanted and we do not want to support or promote cogs from someone who is not welcome in the community. You may not re-apply for Cog Creator unless another unanimous vote from the Cog Creator Organization decides so.