aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNCPlayz <[email protected]>2019-05-19 14:42:33 +0100
committerRapptz <[email protected]>2019-05-19 19:17:27 -0400
commit38eb2b4828dfb0009ef20f6bf471d6cf3c064719 (patch)
treeceb473771b3febc1b2f99d2dc88d27416770cc18
parentUpdate on_group_join docs (diff)
downloaddiscord.py-38eb2b4828dfb0009ef20f6bf471d6cf3c064719.tar.xz
discord.py-38eb2b4828dfb0009ef20f6bf471d6cf3c064719.zip
Validate kwargs in Client.start
-rw-r--r--discord/client.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py
index d92e7c50..9e6067a3 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -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)