Skip to content

Commit 5f113f7

Browse files
committed
Merge branch 'Jerrie-Aries-patch' into development
2 parents cff0b37 + ec9e8f4 commit 5f113f7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cogs/modmail.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,9 +1362,16 @@ async def contact(
13621362
"""
13631363
silent = False
13641364
if isinstance(category, str):
1365-
if "silent" in category or "silently" in category:
1365+
category = category.split()
1366+
1367+
# just check the last element in the list
1368+
if category[-1].lower() in ("silent", "silently"):
13661369
silent = True
1367-
category = category.strip("silently").strip("silent").strip()
1370+
# remove the last element as we no longer need it
1371+
category.pop()
1372+
1373+
category = " ".join(category)
1374+
if category:
13681375
try:
13691376
category = await SimilarCategoryConverter().convert(
13701377
ctx, category

0 commit comments

Comments
 (0)