From d5e9d09141f567541dde4615f3bb4d9a1ddbc420 Mon Sep 17 00:00:00 2001 From: No767 <73260931+No767@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:55:51 -0800 Subject: [PATCH 1/3] Defer all dict cmds --- bot/cogs/dictionary.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bot/cogs/dictionary.py b/bot/cogs/dictionary.py index 851f1a2..cb1fa3a 100644 --- a/bot/cogs/dictionary.py +++ b/bot/cogs/dictionary.py @@ -72,6 +72,7 @@ async def nouns( self, interaction: discord.Interaction, query: Optional[str] = None ) -> None: """Looks up gender neutral nouns and language""" + await interaction.response.defer() url = URL("https://en.pronouns.page/api/nouns") if query: url = url / "search" / query @@ -79,11 +80,11 @@ async def nouns( # If people start using this for pronouns, then a generator shows up # so that's in case this happens if r.content_type == "text/html": - await interaction.response.send_message("Uhhhhhhhhhhhh what mate") + await interaction.followup.send("Uhhhhhhhhhhhh what mate") return data = await r.json(loads=orjson.loads) if len(data) == 0: - await interaction.response.send_message("No nouns were found") + await interaction.followup.send("No nouns were found") return converted = [ NounEntity( @@ -105,13 +106,14 @@ async def inclusive( self, interaction: discord.Interaction, term: Optional[str] = None ) -> None: """Provides inclusive terms for users to learn about""" + await interaction.response.defer() url = URL("https://en.pronouns.page/api/inclusive") if term: url = url / "search" / term async with self.session.get(url) as r: data = await r.json(loads=orjson.loads) if len(data) == 0: - await interaction.response.send_message("No inclusive terms were found") + await interaction.followup.send("No inclusive terms were found") return converted = [ InclusiveEntity( From 504199f759f76fb59bf6b5835e76141cb6c084c3 Mon Sep 17 00:00:00 2001 From: No767 <73260931+No767@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:04:53 -0800 Subject: [PATCH 2/3] Fix incorrect usage of using user names --- bot/cogs/pride_profiles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/cogs/pride_profiles.py b/bot/cogs/pride_profiles.py index bb25e03..b54dd88 100644 --- a/bot/cogs/pride_profiles.py +++ b/bot/cogs/pride_profiles.py @@ -25,7 +25,7 @@ def _disambiguate(self, rows) -> str: return f"Profile not found. Did you mean...\n{names}" @app_commands.command(name="view") - @app_commands.describe(name="The user's username (not global name)") + @app_commands.describe(name="The user's global or preferred name") async def view(self, interaction: discord.Interaction, name: str) -> None: """Look at a pride profile""" query = """ @@ -76,7 +76,7 @@ async def register(self, interaction: discord.Interaction) -> None: async with self.pool.acquire() as conn: await register_user(interaction.user.id, conn) status = await conn.execute( - query, interaction.user.id, interaction.user.name + query, interaction.user.id, interaction.user.global_name ) if status[-1] == "0": From 0bbea05bf47d86c4246a42c33d1a4ee2df960ae6 Mon Sep 17 00:00:00 2001 From: No767 <73260931+No767@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:08:48 -0800 Subject: [PATCH 3/3] Mark for v0.7.1 release --- bot/cogs/__init__.py | 2 +- changelog.md | 18 ++++++------------ pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/bot/cogs/__init__.py b/bot/cogs/__init__.py index 7b4a1fa..902e7fe 100644 --- a/bot/cogs/__init__.py +++ b/bot/cogs/__init__.py @@ -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=7, micro=0, releaselevel="final") +VERSION: VersionInfo = VersionInfo(major=0, minor=7, micro=1, releaselevel="final") diff --git a/changelog.md b/changelog.md index 2cc3563..9099511 100644 --- a/changelog.md +++ b/changelog.md @@ -1,23 +1,17 @@ -QOL and bug-fixing update. See below for details +Patch to address two unnoticed bugs. For the release of v0.7.0, please see the [release notes](https://github.com/No767/Catherine-Chan/releases/tag/v0.7.0) ## ✨ TD;LR -- Fixed unknown messages for timeout views -- Fixed registering for pride profiles and deletion +- Addressed incorrect usage of username for pride profiles ## 🛠️ Changes -- Require searching up using global usernames instead for pride profiles -- Account for pronouns in dictionary commands -- Removed button prompt for `/pride-profiles register` -- Improved deletion prompts for `/pride-profiles delete` and `/tonetags delete` -- Implement merged deletion backend for `/tonetags delete` and `/tonetags delete-id` +- Defer all dictionary commands +- Implement correct usage of global names for pride profiles ## ✨ Additions -- Improved cog reloader -- Nanika's signal handlers - +- N/A ## ➖ Removals -- `cysystemd` (causing duplicate logs) \ No newline at end of file +- N/A \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4f9f791..689cc42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "catherine-chan" -version = "0.7.0" +version = "0.7.1" description = "An informational LGBTQ based discord bot" authors = ["No767 <73260931+No767@users.noreply.github.com>"] readme = "README.md"