Skip to content

Commit

Permalink
Merge branch 'patch' of git://github.com/Jerrie-Aries/modmail into Je…
Browse files Browse the repository at this point in the history
…rrie-Aries-patch
  • Loading branch information
fourjr committed Nov 19, 2021
2 parents cff0b37 + 68827f7 commit ec9e8f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,9 +1362,16 @@ async def contact(
"""
silent = False
if isinstance(category, str):
if "silent" in category or "silently" in category:
category = category.split()

# just check the last element in the list
if category[-1].lower() in ("silent", "silently"):
silent = True
category = category.strip("silently").strip("silent").strip()
# remove the last element as we no longer need it
category.pop()

category = " ".join(category)
if category:
try:
category = await SimilarCategoryConverter().convert(
ctx, category
Expand Down

0 comments on commit ec9e8f4

Please sign in to comment.