Skip to content

Commit ea790ca

Browse files
committed
Change order of arguments in contact command
1 parent bfc0da1 commit ea790ca

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
# v2.9.1
8+
Changed order of arguments for the contact command. This is so that you can use aliases to their full potential.
9+
For example:
10+
- `contact "Recruitment Category" @somedude`
11+
12+
You can add an alias by doing: `alias add recruit contact "Recruitment Category"`
13+
14+
Now you can use the alias via: `recruit @somedude`
15+
716
# v2.9.0
817

918
### Added

bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.9.0'
25+
__version__ = '2.9.1'
2626

2727
import asyncio
2828
import textwrap

cogs/modmail.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,12 @@ async def edit(self, ctx, message_id: Optional[int]=None, *, new_message):
424424
@commands.command()
425425
@trigger_typing
426426
@commands.has_permissions(manage_channels=True)
427-
async def contact(self, ctx, user: Union[discord.Member, discord.User], *, category: Optional[discord.CategoryChannel]=None):
427+
async def contact(self, ctx, category: Optional[discord.CategoryChannel]=None, *, user: Union[discord.Member, discord.User]):
428428
"""Create a thread with a specified member."""
429429

430430
exists = await self.bot.threads.find(recipient=user)
431431
if exists:
432-
return await ctx.send(embed=discord.Embed(color=discord.Color.red(), description='A thread for this user already exists.'))
432+
return await ctx.send(embed=discord.Embed(color=discord.Color.red(), description=f'A thread for this user already exists in {exists.channel}'))
433433
else:
434434
thread = await self.bot.threads.create(user, creator=ctx.author, category=category)
435435

0 commit comments

Comments
 (0)