Skip to content

Commit 46c2611

Browse files
committed
Fixed a error where recipient is type int
1 parent 718fc7c commit 46c2611

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/thread.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ def __init__(self, manager: 'ThreadManager',
1919
int],
2020
channel: typing.Union[discord.DMChannel,
2121
discord.TextChannel]):
22-
if recipient.bot:
23-
raise CommandError('Recipient cannot be a bot.')
24-
2522
self.manager = manager
2623
self.bot = manager.bot
2724
if isinstance(recipient, int):
2825
self._id = recipient
2926
self._recipient = None
3027
else:
28+
if recipient.bot:
29+
raise CommandError('Recipient cannot be a bot.')
3130
self._id = recipient.id
3231
self._recipient = recipient
3332
self._channel = channel

0 commit comments

Comments
 (0)