Skip to content

Commit

Permalink
Bump to v0.6.1 #patch
Browse files Browse the repository at this point in the history
This update fixes a critical issue with the internal blacklist tripping for no reason. Please see the changelog for more detailed information ~ Noelle
  • Loading branch information
No767 authored Dec 5, 2023
2 parents 2c40df2 + d0a22a2 commit a385b13
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 65 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ updates:
prefix: "[pip]"
include: "scope"
target-branch: "main"
ignore:
# Ignore cystemd bc the newest release breaks all workflows
- dependency-name: "cysystemd"
update-types: ["version-update:semver-minor", "version-update:semver-major"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion bot/cogs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def __str__(self) -> str:


EXTENSIONS = [module.name for module in iter_modules(__path__, f"{__package__}.")]
VERSION: VersionInfo = VersionInfo(major=0, minor=6, micro=0, releaselevel="final")
VERSION: VersionInfo = VersionInfo(major=0, minor=6, micro=1, releaselevel="final")
3 changes: 1 addition & 2 deletions bot/libs/utils/blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ class BlacklistEntity:
__slots__ = ("id", "blacklist_status", "unknown_entity")

def __init__(self, record: Optional[asyncpg.Record] = None):
self.unknown_entity = True
self.blacklist_status = None

if record:
self.id = record["id"]
self.blacklist_status = record["blacklist_status"]
self.unknown_entity = False


@alru_cache(maxsize=256)
Expand Down
5 changes: 4 additions & 1 deletion bot/libs/utils/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ async def interaction_check(self, interaction: discord.Interaction) -> bool:
# 1. The blacklist entity must actually be blacklisted
# 2. It's not an "unknown" entity (i.e the user doesn't exist in the DB)
# This way, only *actual* blacklisted users get the message
if blacklist.blacklist_status is True and blacklist.unknown_entity is False:
if (
blacklist.blacklist_status is not None
and blacklist.blacklist_status is True
):
bot.metrics.attempted_commands.inc(1)
await interaction.response.send_message(
f"My fellow user, {interaction.user.mention}, you just got the L. You are blacklisted from using this bot. Take an \U0001f1f1, \U0001f1f1oser. [Here is your appeal form](https://media.tenor.com/K9R9beOgPR4AAAAC/fortnite-thanos.gif)"
Expand Down
27 changes: 7 additions & 20 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
QOL changes with the dictionary commands, new HRT conversion commands and bug fixes
Patch release to address a critical bug that went unnoticed.
For the release of v0.6.0, please see the [release notes](https://github.com/No767/Catherine-Chan/releases/tag/v0.6.0)

## ✨ TD;LR

- Properly applied markdown formatting for dictionary commands
- Re-wrote HRT conversion commands
- Proper bug fixes
- Fixed internal bug where the blacklist would prevent interactions from going through for non-blacklisted users

## 🛠️ Changes

- Rewrite blacklist system to use an LRU cache (this provides a major speedup)
- Properly fix timeout errors with `CatherinePages` and `CatherineView`
- Rewrite dictionary commands with custom regex link formatter
- Load Jishaku in production (this allows for debug commands in production)
- Optionally provide a message response when a `CatherineView` times out (instead of just removing the view)
- Completely redo and retest HRT conversion commands
- Implement cog checks for dev tools cog
- Split HRT conversion commands into subcommands instead of one big command
- Fix a bug where the default unit to convert to had an 0.0 instead of the user given value
- Clean up `/about` command and include an "about me" description
- Migrate `DevTools` commands over to the new `Admin` cog
- Fixed `reload-all` command not loading lib modules
- Fixed internal bug where the blacklist would prevent interactions from going through for non-blacklisted users
- Downgrade and pin `cysystemd` to 1.5.3 due to no built wheels for 1.6.0

## ✨ Additions

- Prolactin conversion
- Formatted dictionary entries
- Proper `reload-all` command that reloads all library files in one go
- N/A

## ➖ Removals

- Old blacklist caches
- N/A
70 changes: 45 additions & 25 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a385b13

Please sign in to comment.