State¶
Mock implementation of a discord.state.ConnectionState
. Overwrites a Client’s default state, allowing hooking of
its methods and support for test-related features.
- class FakeState(client: Client, http: HTTPClient, user: ClientUser | None = None, loop: AbstractEventLoop | None = None)¶
A mock implementation of a
ConnectionState
. Overrides methods that would otherwise cause issues, and implements functionality such as disabling dispatch temporarily.- http: back.FakeHttp¶
- __init__(client: Client, http: HTTPClient, user: ClientUser | None = None, loop: AbstractEventLoop | None = None) None ¶