Mock implementation of a discord.gateway.DiscordWebSocket. Overwrites a Client’s default websocket, allowing hooking of its methods to update the backend and provide callbacks.

class FakeWebSocket(*args: Any, **kwargs: Any)

A mock implementation of a DiscordWebSocket. Instead of actually sending information to discord, it simply triggers calls to the testcord backend, as well as triggering runner callbacks.

__init__(*args: Any, **kwargs: Any) None
async send(data: Dict[str, Union[str, int, bool, Dict[str, JsonVal], List[JsonVal]]]) None
async change_presence(*, activity: Optional[discord.BaseActivity] = None, status: Optional[str] = None, since: float = 0.0) None