Skip to content

Commit 40f4022

Browse files
committed
use typing.Union for member converter
1 parent ed077b8 commit 40f4022

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cogs/modmail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import datetime
55
import dateutil.parser
66
import re
7-
from typing import Optional
7+
from typing import Optional, Union
88
from core.decorators import trigger_typing
99
from core.paginator import PaginatorSession
1010

@@ -172,7 +172,7 @@ async def nsfw(self, ctx):
172172

173173
@commands.command()
174174
@trigger_typing
175-
async def logs(self, ctx, *, member: discord.Member=None):
175+
async def logs(self, ctx, *, member: Union[discord.Member, discord.User]=None):
176176
"""Shows a list of previous modmail thread logs of a member."""
177177

178178
if not member:
@@ -270,7 +270,7 @@ async def edit(self, ctx, message_id: Optional[int]=None, *, new_message):
270270
@commands.command()
271271
@trigger_typing
272272
@commands.has_permissions(manage_channels=True)
273-
async def contact(self, ctx, *, user: discord.Member):
273+
async def contact(self, ctx, *, user: Union[discord.Member, discord.User]):
274274
"""Create a thread with a specified member."""
275275

276276
exists = await self.bot.threads.find(recipient=user)

0 commit comments

Comments
 (0)