Update for Red 3.5 and some fixes#66
Open
aikaterna wants to merge 1 commit into
Open
Conversation
Aioxas
requested changes
Nov 3, 2023
Owner
Aioxas
left a comment
There was a problem hiding this comment.
LGTM, just that thing with the failsafe function
| @@ -274,15 +245,18 @@ async def _font(self, ctx, url: str = None): | |||
| await ctx.send("Font has been saved") | |||
Owner
There was a problem hiding this comment.
...well that was some dumb code. I never let it download and save the custom font 😅 It would be telling you "yes your font is saved :D ...not."
| img_buffer = BytesIO() | ||
| img.save(img_buffer, format='PNG') | ||
| img_buffer.seek(0) | ||
| return img_buffer |
Owner
There was a problem hiding this comment.
so correct me if I'm wrong, now there is no persistent storing of the edited cookie, but it now exists as an image buffer which is then emptied into the discord.File uploader, yeah?
| dailynum = re.findall(regex[5], test) | ||
| self.fortune_process(fortune[0]) | ||
| await ctx.send("Your fortune is:", file=discord.File(str(bundled_data_path(self) / "cookie-edit.png"))) | ||
| img_png = self.fortune_process(fortune[0]) |
Owner
There was a problem hiding this comment.
Shouldn't there be a failsafe function for the cookie.png if for any weird reason the cookie file goes kapoof now that file_check fn is gone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cog that I am most confident about is horoscope as it's used on my bot almost daily. I didn't go through and test every cog fully, so some remaining code may need to be adjusted in the future.
advgoogle - no changes, already hidden
emote - sort of halfway fixed. you may want to look at it sometime. added data statement
geico - hidden, bash.org disappeared about 2 months ago but sometimes the site reappears in the future when this happens. The site you use for the quotes command is returning some sort of js-related challenge before it redirects to the quotes page, so not quite sure how to remedy that.
horoscope - fixed, fixed info, fixed data statement
longcat - fixed, fixed info, fixed data statement
loot - fixed, fixed info, fixed data statement
lootbox - fixed, fixed info, fixed data statement
points - fixed, fixed info, fixed data statement
strawpoll - hidden, strawpoll.me closed down in 2022
the100 - hidden because I don't have access to an API key to test, and it looks like they have a new version of the API from after this cog was made
trove - hidden, not quite sure how the troves are supposed to get populated in the cog data