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/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( 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": 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"