Skip to content

Commit

Permalink
Bump to v0.7.1 #patch
Browse files Browse the repository at this point in the history
Fixes two unnoticed bugs in regards to v0.7.0. See changelog for details - Noelle
  • Loading branch information
No767 authored Jan 10, 2024
2 parents 53e412f + 0bbea05 commit 2087a24
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
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=7, micro=0, releaselevel="final")
VERSION: VersionInfo = VersionInfo(major=0, minor=7, micro=1, releaselevel="final")
8 changes: 5 additions & 3 deletions bot/cogs/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,19 @@ 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
async with self.session.get(url) as r:
# 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(
Expand All @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions bot/cogs/pride_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """
Expand Down Expand Up @@ -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":
Expand Down
18 changes: 6 additions & 12 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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)
- N/A
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 2087a24

Please sign in to comment.