public void Uninstall() { _discordClient?.Do((client) => { if (client != null) { client.ReactionAdded -= DiscordClient_ReactionAdded; client.ReactionRemoved -= DiscordClient_ReactionRemoved; client.ReactionsCleared -= DiscordClient_ReactionsCleared; } }); _messageData.Clear(); }
public void Dispose() { try { _discordClient?.Do((client) => { if (client != null) { client.MessageReceived -= MessageReceivedHandler; client.JoinedGuild -= JoinedGuildHandler; client.LeftGuild -= LeftGuildHandler; } }); } catch { } try { Modules?.Clear(); } catch { } }