Hi Kuro, thanks for your patience while I worked on reviewing your repo.
Commit hash 7c88c472a2b16f632f03029882cd589b80753854 from 6/20
Your repo install message includes āUse [p]cog list kuro-cogs to see available cogs.ā but someone may have installed it under a different repo name. Most folks using the index will copy-paste the repo install instruction so this may not need to be changed, but I thought Iād mention the possibility.
Your cog install messages say things like Thanks for installing Cogname! Use .help Cogname to see all the available commands.
You may want to say something like āUse .help Cogname to see all the available commands after loading the cog.ā to prompt users to load the cog first.
Ignored: docs, as itās not a cog package
Very nice docs site. Helps users to figure out cogs that have documentation like this, even if it is reposting of docstrings.
The few things I feel are required are prefixed by Fix: in the list below.
AvatarImgen
Fix: None of the commands work because the APIs are down, or the site is now gone - some-random-api.ml doesnāt exist any more. You can fix this cog by finding a new API or two, or removing it, or setting it to disabled in the info.json.
Calendar
No requested changes.
You may want to use discord.datetime.utcnow() instead of datetime.utcnow() - https://discordpy.readthedocs.io/en/v2.2.3/migrating.html#datetime-objects-are-now-utc-aware.
Chairs
No requested changes.
Cogcount
No requested changes.
DankUtils
No requested changes.
FakeMod
No requested changes.
You may want to provide a note at the bottom of the current settings display on how to change emojis, like saying something like āUse [p]help fakemodlogset emoji for settingsā or similar.
Fumo
Fix: [p]fumoroid, marisafie, and marisahat error out.
ERROR [red] Exception in command 'fumoroid'
Traceback (most recent call last)
/Users/aikaterna/red38/lib/python3.8/site-packages/discord/ext/commands/core.py:229 in wrapped
ā± 229 ret = await coro(*args, **kwargs)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/CogManager/cogs/fumo/fumo.py:111 in fumoroid
ā± 111 avatar = await get_avatar(user)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/CogManager/cogs/fumo/utils.py:44 in get_avatar
ā± 44 await user.avatar_url_as(static_format="png").save(avatar, seek_begin=True)
AttributeError: 'Member' object has no attribute 'avatar_url_as'
Osu
Fix: Your dependency git+https://github.com/NiceAesth/aiosu does not install on Python 3.8.x, which is still supported by Red. Add a key to this cogās info.json to declare that Python 3.9 is the minimum Python version to use with this cog.
The osu link command does not explain how to link your account.
I canāt fully test this cog as I donāt use the dashboard so you may have other user-facing issues present.
You should probably mention somewhere that this cog queries an external API and sends over their player username to it (Martineās API for the profile image generation). Maybe in the cog install message so that itās the bot ownerās responsibility to communicate that to their users, but Iāll leave that up to you to decide.
I used [p]help Osu and got this traceback one time, but not when I used it a different time. The help displayed showed the unawaited coroutine, see https://cdn.discordapp.com/attachments/321143541638234112/1122317009397481573/osuhelp.png
WARNING [py.warnings] /Users/aikaterna/red39/lib/python3.9/site-packages/redbot/core/commands/help.py:566: RuntimeWarning: coroutine 'OsuMixin.format_help_for_context' was never awaited
description = obj.format_help_for_context(ctx)
Reactlog
For the the handle_ghost_channel function, while I like the idea of being able to clean settings out of Config when there is a channel missing, I have had pushback against this from users when I implemented it in a cog. A channel can become unavailable temporarily if someone removes the bot from the channel or other reasons, but if they put it back later, all of their settings are gone.
Kind of amusing to find code that I wrote in a repo Iām reviewing, thanks for the code attribution to other folksā work in this cog.
Sudo
This is only my opinion and it doesnāt come from an official standpoint where you would have to modify this cog to keep it on your repo. I donāt expect you to change things based on my opinion, but I wanted to talk about it a little.
Personally, I feel like you should not be modifying attributes that are on the bot class during runtime with a 3rd party cog, like the owner list. I was inclined to ask you to remove this cog or set it as hidden for my approval, but in talks with other folks they seem to be more permissive on this point. In my opinion, contributing or testing Jackās draft PR on Red itself for this feature instead of a 3rd party cog would be more attractive, but that is not for me to enforce or say that you should do that instead of providing choices via 3rd party cogs.
Translate
Used [p]translate ććÆćć --to English --translator libre
. Seemed to be a temporary issue where there was nothing in the response from the site, as it worked later.
ERROR [red] Exception in command 'translate'
Traceback (most recent call last)
/Users/aikaterna/red39/lib/python3.9/site-packages/discord/ext/commands/core.py:229 in wrapped
ā± 229 ret = await coro(*args, **kwargs)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/CogManager/cogs/translate/translate.py:99 in translate
ā± 99 result = await self._translate(
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/CogManager/cogs/translate/translate.py:179 in _translate
ā± 179 result = await self.bot.loop.run_in_executor(
/opt/homebrew/Cellar/python@3.9/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py:58 in run
ā± 58 result = self.fn(*self.args, **self.kwargs)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translators/base.py:110 in translate
ā± 110 source_language, translation = self._translate(text, dest_code, source_code)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translators/libre.py:22 in _translate
ā± 22 source_language = self._language(text)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translators/libre.py:33 in _language
ā± 33 return response.json()[0]["language"]
KeyError: 0
Used flag_cu as a reaction on a message with translateset react enabled, where no service was able to return a valid result.
ERROR [red.kuro-cogs.translate] Error while translating message (ID: 0000000000000000000) with reaction.
Traceback (most recent call last)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translators/mymemory.py:32 in _translate
ā± 32 result = request.json()["matches"][0]
IndexError: string index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translate.py:135 in translate
ā± 135 return _translate(translator=service, index=index)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translate.py:107 in _translate
ā± 107 result = translator.translate(
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translators/base.py:110 in translate
ā± 110 source_language, translation = self._translate(text, dest_code, source_code)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translators/mymemory.py:34 in _translate
ā± 34 raise MyMemoryException("NO_MATCH")
MyMemoryException: NO_MATCH | There is no match to the translation
The above exception was the direct cause of the following exception:
Traceback (most recent call last)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/CogManager/cogs/translate/translate.py:162 in on_reaction_add
ā± 162 result = await self._translate(message.content, Translator(), str(language))
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/CogManager/cogs/translate/translate.py:179 in _translate
ā± 179 result = await self.bot.loop.run_in_executor(
/opt/homebrew/Cellar/python@3.9/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py:58 in run
ā± 58 result = self.fn(*self.args, **self.kwargs)
/Users/aikaterna/Library/Application Support/Red-DiscordBot/data/catdev/cogs/Downloader/lib/translatepy/translate.py:140 in translate
ā± 140 raise NoResult("No service has returned a valid result") from exception
NoResult: No service has returned a valid result