[APPROVED] YamiCogs

Discord Name: YamiKaitou#8975

GitHub Repository (Must be V3): https://github.com/yamikaitou/YamiCogs

Description: Just some random cogs. At the time of this post, there are only 2 cogs that are not hidden and disabled. Feel free to review the other ones if you want, they may or may not be functional :wink:

1 Like

Howdy! Sorry for the delay in reviewing your application. We at QA have been working on finalizing some documentation outlining exactly how these applications are reviewed. Since this application was made before the documentation was live, I am letting you know so you can double check that your repo meets these new requirements. We hope this transparency will help you to better prepare your repo for review.

Thank you for being patient while your repo was reviewed. There are a few errors that are able to reasonably happen under normal use that need to be cleaned up, but otherwise this application looks good! Please let me know when you have made the required changes.

Commit hash: c6f0d0c8b4681932ecdcaf5a444de2d56430fb7d
Red v3.4.5
Consider anything prefaced with “You might want” to be optional

General
-You might want to use the install_msg info.json key.

Kill
-Deleting every kill response and then attempting to kill someone throws an exception.

Traceback (most recent call last):
  File "kill.py", line 132, in kill
    msg = kills[random.randint(0, len(kills) - 1)]
  File "Python\Python38-32\lib\random.py", line 248, in randint
    return self.randrange(a, b+1)
  File "Python\Python38-32\lib\random.py", line 226, in randrange
    raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0, 0, 0)

-Deleting every kill response then attempting to use [p]killset list throws an exception.

Traceback (most recent call last):
  File "kill.py", line 94, in _list
    await ctx.send(embed=embed)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed.fields.2.value: This field is required

-Trying to delete a kill response out of the expected bounds throws an exception. The handling that is currently there does not prevent the error from being thrown, and is formatted weird.

Traceback (most recent call last):
  File "kill.py", line 66, in _delete
    kill.pop(num)
IndexError: pop index out of range

-Custom kill messages can cause errors if curly braces are used in non-intended ways. You might want to catch this error or use .replace instead.
Example: {test} throws

Traceback (most recent call last):
  File "kill.py", line 135, in kill
    msg.format(
KeyError: 'test'

-You might want to check for add_reactions perms in the commands that use them.

Traceback (most recent call last):
  File "kill.py", line 51, in _add
    await ctx.message.add_reaction("\U00002705")
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

-You might want to use 2 newlines to de-bold the second two lines of the helptext of [p]killset add.

"""
Add a new kill message.

{killer} and {victim} will be replaced with a users mention
{killer2} and {victim2} will be replaced with a users name in italics
"""

Payday
-The [p]pdconfig settings check if the value is negative and send a message, but will still set to a negative value.
-Booting up the cog for the first time and running [p]freecredits times without configuring anything, I got an error.

Traceback (most recent call last):
  File "payday.py", line 109, in freecredits_times
    await ctx.send(strings)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message

-You might want to reword the help text of [p]freecredits, the grammar does not make sense to me.
-You might want to add a warning message when running [p]freecredits all when all sources are on cooldown or disabled.

I believe I have made corrections for everything you mentioned.

Since you added a new cog, I have added that one to this review. There is also one lingering issue with kill.

Commit hash: 2d585671043a410b1c326d331aac4c7f8f39357d
Red v3.4.5
Consider anything prefaced with “You might want” to be optional

Kill
-The bounds checking of [p]killset delete still errors on (max + 1) and negative values.

Payday
-Looks all set!

EconomyTrickle
-[p]economytrickle info has a number parameter that does not appear to be used.
-You cannot get “messages” as the on_message listener is not functional.

[2021-01-14 14:42:10] [WARNING] py.warnings: economytrickle.py:81: RuntimeWarning: coroutine 'RedBase.cog_disabled_in_guild' was never awaited
  if self.bot.cog_disabled_in_guild(self, message.guild):

-You might want to fix the |admin-lock| part of your docs, it is missing the stuff to make it be replaced (like in the red docs).
-You might want to remove the excess code in economytrickle (checks.py & the import, as it is never used in that cog).

Huh, I added that disabled check and forgot to test it afterwards. All the changes have been made

Alright, everything looks all set now! Marking this as approved, you should see your perks within a few days. Thanks for applying!