aboutsummaryrefslogtreecommitdiff
path: root/discord/gateway.py
diff options
context:
space:
mode:
authorAaron Hennessey <[email protected]>2021-07-21 07:45:57 +0100
committerGitHub <[email protected]>2021-07-21 02:45:57 -0400
commit15eb3d2e5d9c4960ea68f7e776636388bbac6266 (patch)
tree608e8643bbe04e6c0fec8fc16dae8da5076d4a14 /discord/gateway.py
parentStricter type hint in releaselevel (diff)
downloaddiscord.py-15eb3d2e5d9c4960ea68f7e776636388bbac6266.tar.xz
discord.py-15eb3d2e5d9c4960ea68f7e776636388bbac6266.zip
Remove afk parameter from change_presence
Diffstat (limited to 'discord/gateway.py')
-rw-r--r--discord/gateway.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/gateway.py b/discord/gateway.py
index 0a6b05d0..aea1aad4 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -594,7 +594,7 @@ class DiscordWebSocket:
if not self._can_handle_close():
raise ConnectionClosed(self.socket, shard_id=self.shard_id) from exc
- async def change_presence(self, *, activity=None, status=None, afk=False, since=0.0):
+ async def change_presence(self, *, activity=None, status=None, since=0.0):
if activity is not None:
if not isinstance(activity, BaseActivity):
raise InvalidArgument('activity must derive from BaseActivity.')
@@ -609,7 +609,7 @@ class DiscordWebSocket:
'op': self.PRESENCE,
'd': {
'activities': activity,
- 'afk': afk,
+ 'afk': False,
'since': since,
'status': status
}
@@ -718,7 +718,7 @@ class DiscordVoiceWebSocket:
async def _hook(self, *args):
pass
-
+
async def send_as_json(self, data):
log.debug('Sending voice websocket frame: %s.', data)
await self.ws.send_str(utils.to_json(data))
@@ -823,7 +823,7 @@ class DiscordVoiceWebSocket:
interval = data['heartbeat_interval'] / 1000.0
self._keep_alive = VoiceKeepAliveHandler(ws=self, interval=min(interval, 5.0))
self._keep_alive.start()
-
+
await self._hook(self, msg)
async def initial_connection(self, data):