func NewDispatch(ws websocket.DiscordWebsocket) *Dispatch {
	dispatcher := &Dispatch{
		allChan:                      make(chan interface{}),
		readyChan:                    make(chan *Ready),
		resumedChan:                  make(chan *Resumed),
		channelCreateChan:            make(chan *ChannelCreate),
		channelUpdateChan:            make(chan *ChannelUpdate),
		channelDeleteChan:            make(chan *ChannelDelete),
		channelPinsUpdateChan:        make(chan *ChannelPinsUpdate),
		guildCreateChan:              make(chan *GuildCreate),
		guildUpdateChan:              make(chan *GuildUpdate),
		guildDeleteChan:              make(chan *GuildDelete),
		guildBanAddChan:              make(chan *GuildBanAdd),
		guildBanRemoveChan:           make(chan *GuildBanRemove),
		guildEmojisUpdateChan:        make(chan *GuildEmojisUpdate),
		guildIntegrationsUpdateChan:  make(chan *GuildIntegrationsUpdate),
		guildMemberAddChan:           make(chan *GuildMemberAdd),
		guildMemberRemoveChan:        make(chan *GuildMemberRemove),
		guildMemberUpdateChan:        make(chan *GuildMemberUpdate),
		guildMembersChunkChan:        make(chan *GuildMembersChunk),
		guildRoleUpdateChan:          make(chan *GuildRoleUpdate),
		guildRoleCreateChan:          make(chan *GuildRoleCreate),
		guildRoleDeleteChan:          make(chan *GuildRoleDelete),
		messageCreateChan:            make(chan *MessageCreate),
		messageUpdateChan:            make(chan *MessageUpdate),
		messageDeleteChan:            make(chan *MessageDelete),
		messageDeleteBulkChan:        make(chan *MessageDeleteBulk),
		messageReactionAddChan:       make(chan *MessageReactionAdd),
		messageReactionRemoveChan:    make(chan *MessageReactionRemove),
		messageReactionRemoveAllChan: make(chan *MessageReactionRemoveAll),
		presenceUpdateChan:           make(chan *PresenceUpdate),
		presencesReplaceChan:         make(chan *PresencesReplace),
		typingStartChan:              make(chan *TypingStart),
		userUpdateChan:               make(chan *UserUpdate),
		voiceStateUpdateChan:         make(chan *VoiceStateUpdate),
		voiceServerUpdateChan:        make(chan *VoiceServerUpdate),
		webhooksUpdateChan:           make(chan *WebhooksUpdate),

		ws: ws,

		listeners:      make(map[string][]interface{}),
		listenOnceOnly: make(map[string][]int),

		shutdown: make(chan struct{}),
	}

	return dispatcher
}
// NewDispatch construct a Dispatch object for reacting to web socket events
// from discord
NewDispatch construct a Dispatch object for reacting to web socket events
from discord
// NewDispatch construct a Dispatch object for reacting to web socket events // from discord
func NewDispatch(ws websocket.DiscordWebsocket) *Dispatch {
	dispatcher := &Dispatch{
		allChan:                      make(chan interface{}),
		readyChan:                    make(chan *Ready),
		resumedChan:                  make(chan *Resumed),
		channelCreateChan:            make(chan *ChannelCreate),
		channelUpdateChan:            make(chan *ChannelUpdate),
		channelDeleteChan:            make(chan *ChannelDelete),
		channelPinsUpdateChan:        make(chan *ChannelPinsUpdate),
		guildCreateChan:              make(chan *GuildCreate),
		guildUpdateChan:              make(chan *GuildUpdate),
		guildDeleteChan:              make(chan *GuildDelete),
		guildBanAddChan:              make(chan *GuildBanAdd),
		guildBanRemoveChan:           make(chan *GuildBanRemove),
		guildEmojisUpdateChan:        make(chan *GuildEmojisUpdate),
		guildIntegrationsUpdateChan:  make(chan *GuildIntegrationsUpdate),
		guildMemberAddChan:           make(chan *GuildMemberAdd),
		guildMemberRemoveChan:        make(chan *GuildMemberRemove),
		guildMemberUpdateChan:        make(chan *GuildMemberUpdate),
		guildMembersChunkChan:        make(chan *GuildMembersChunk),
		guildRoleUpdateChan:          make(chan *GuildRoleUpdate),
		guildRoleCreateChan:          make(chan *GuildRoleCreate),
		guildRoleDeleteChan:          make(chan *GuildRoleDelete),
		messageCreateChan:            make(chan *MessageCreate),
		messageUpdateChan:            make(chan *MessageUpdate),
		messageDeleteChan:            make(chan *MessageDelete),
		messageDeleteBulkChan:        make(chan *MessageDeleteBulk),
		messageReactionAddChan:       make(chan *MessageReactionAdd),
		messageReactionRemoveChan:    make(chan *MessageReactionRemove),
		messageReactionRemoveAllChan: make(chan *MessageReactionRemoveAll),
		presenceUpdateChan:           make(chan *PresenceUpdate),
		presencesReplaceChan:         make(chan *PresencesReplace),
		typingStartChan:              make(chan *TypingStart),
		userUpdateChan:               make(chan *UserUpdate),
		voiceStateUpdateChan:         make(chan *VoiceStateUpdate),
		voiceServerUpdateChan:        make(chan *VoiceServerUpdate),
		webhooksUpdateChan:           make(chan *WebhooksUpdate),
		ws: ws,
		listeners:      make(map[string][]interface{}),
		listenOnceOnly: make(map[string][]int),
		shutdown: make(chan struct{}),
	}
	return dispatcher
}
func NewDispatch ( ws websocket . DiscordWebsocket ) * Dispatch { dispatcher := & Dispatch { allChan : make ( chan interface { } ) , readyChan : make ( chan * Ready ) , resumedChan : make ( chan * Resumed ) , channelCreateChan : make ( chan * ChannelCreate ) , channelUpdateChan : make ( chan * ChannelUpdate ) , channelDeleteChan : make ( chan * ChannelDelete ) , channelPinsUpdateChan : make ( chan * ChannelPinsUpdate ) , guildCreateChan : make ( chan * GuildCreate ) , guildUpdateChan : make ( chan * GuildUpdate ) , guildDeleteChan : make ( chan * GuildDelete ) , guildBanAddChan : make ( chan * GuildBanAdd ) , guildBanRemoveChan : make ( chan * GuildBanRemove ) , guildEmojisUpdateChan : make ( chan * GuildEmojisUpdate ) , guildIntegrationsUpdateChan : make ( chan * GuildIntegrationsUpdate ) , guildMemberAddChan : make ( chan * GuildMemberAdd ) , guildMemberRemoveChan : make ( chan * GuildMemberRemove ) , guildMemberUpdateChan : make ( chan * GuildMemberUpdate ) , guildMembersChunkChan : make ( chan * GuildMembersChunk ) , guildRoleUpdateChan : make ( chan * GuildRoleUpdate ) , guildRoleCreateChan : make ( chan * GuildRoleCreate ) , guildRoleDeleteChan : make ( chan * GuildRoleDelete ) , messageCreateChan : make ( chan * MessageCreate ) , messageUpdateChan : make ( chan * MessageUpdate ) , messageDeleteChan : make ( chan * MessageDelete ) , messageDeleteBulkChan : make ( chan * MessageDeleteBulk ) , messageReactionAddChan : make ( chan * MessageReactionAdd ) , messageReactionRemoveChan : make ( chan * MessageReactionRemove ) , messageReactionRemoveAllChan : make ( chan * MessageReactionRemoveAll ) , presenceUpdateChan : make ( chan * PresenceUpdate ) , presencesReplaceChan : make ( chan * PresencesReplace ) , typingStartChan : make ( chan * TypingStart ) , userUpdateChan : make ( chan * UserUpdate ) , voiceStateUpdateChan : make ( chan * VoiceStateUpdate ) , voiceServerUpdateChan : make ( chan * VoiceServerUpdate ) , webhooksUpdateChan : make ( chan * WebhooksUpdate ) , ws : ws , listeners : make ( map [ string ] [ ] interface { } ) , listenOnceOnly : make ( map [ string ] [ ] int ) , shutdown : make ( chan struct { } ) , } return dispatcher }
NewDispatch construct a Dispatch object for reacting to web socket events
from discord
NewDispatch construct a Dispatch object for reacting to web socket events from discord