DiscordShardManagerDelegate
public protocol DiscordShardManagerDelegate : class, DiscordTokenBearer
The delegate for a DiscordShardManager
.
-
Signals that the manager has finished connecting.
Declaration
Swift
func shardManager(_ manager: DiscordShardManager, didConnect connected: Bool)
Parameters
manager
The manager.
didConnect
Should always be true.
-
Signals that the manager has disconnected.
Declaration
Swift
func shardManager(_ manager: DiscordShardManager, didDisconnectWithReason reason: String)
Parameters
manager
The manager.
didDisconnectWithReason
The reason the manager disconnected.
-
Signals that the manager received an event. The client should handle this.
Declaration
Swift
func shardManager(_ manager: DiscordShardManager, shouldHandleEvent event: DiscordDispatchEvent,
Parameters
manager
The manager.
shouldHandleEvent
The event to be handled.
withPayload
The payload that came with the event.