MCPcopy Create free account
hub / github.com/devoxin/Lavalink.py / destroy_player

Method destroy_player

lavalink/node.py:570–586  ·  view source on GitHub ↗

|coro| Destroys a player on the node. It's recommended that you use :func:`PlayerManager.destroy` to destroy a player. Returns ------- bool Whether the player was destroyed.

(self, guild_id: Union[str, int])

Source from the content-addressed store, hash-verified

568 params=params, json=json) # type: ignore
569
570 async def destroy_player(self, guild_id: Union[str, int]) -> bool:
571 """|coro|
572
573 Destroys a player on the node.
574 It's recommended that you use :func:`PlayerManager.destroy` to destroy a player.
575
576 Returns
577 -------
578 bool
579 Whether the player was destroyed.
580 """
581 session_id = self.session_id
582
583 if not session_id:
584 raise ClientError('Cannot destroy a player without a valid session ID!')
585
586 return await self.request('DELETE', f'sessions/{session_id}/players/{guild_id}') # type: ignore
587
588 async def update_session(self, resuming: bool = MISSING, timeout: int = MISSING) -> Optional[RawSession]:
589 """|coro|

Callers 2

change_nodeMethod · 0.80
destroyMethod · 0.80

Calls 2

requestMethod · 0.95
ClientErrorClass · 0.85

Tested by

no test coverage detected