mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 08:44:10 +00:00
Validate kwargs in Client.start
This commit is contained in:
parent
007b7ebf3a
commit
38eb2b4828
@ -503,10 +503,19 @@ class Client:
|
||||
"""|coro|
|
||||
|
||||
A shorthand coroutine for :meth:`login` + :meth:`connect`.
|
||||
|
||||
Raises
|
||||
-------
|
||||
TypeError
|
||||
An unexpected keyword argument was received.
|
||||
"""
|
||||
|
||||
bot = kwargs.pop('bot', True)
|
||||
reconnect = kwargs.pop('reconnect', True)
|
||||
|
||||
if kwargs:
|
||||
raise TypeError("unexpected keyword argument(s) %s" % list(kwargs.keys()))
|
||||
|
||||
await self.login(*args, bot=bot)
|
||||
await self.connect(reconnect=reconnect)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user