function module.new(m,t)local l=setmetatable({},methods)l.ChatService=m l.PlayerObj=nil l.Name=t l.ExtraData={}l.Channels={}l.MutedSpeakers={}l.eDestroyed=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eSaidMessage=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eReceivedMessage=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eMessageDoneFiltering=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eReceivedSystemMessage=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eChannelJoined=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eChannelLeft=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eMuted=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eUnmuted=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eExtraDataUpdated=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eMainChannelSet=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.eChannelNameColorUpdated=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")l.Destroyed=l.eDestroyed.Event l.SaidMessage=l.eSaidMessage.Event l.ReceivedMessage=l.eReceivedMessage.Event l.MessageDoneFiltering=l.eMessageDoneFiltering.Event l.ReceivedSystemMessage=l.eReceivedSystemMessage.Event l.ChannelJoined=l.eChannelJoined.Event l.ChannelLeft=l.eChannelLeft.Event l.Muted=l.eMuted.Event l.Unmuted=l.eUnmuted.Event l.ExtraDataUpdated=l.eExtraDataUpdated.Event l.MainChannelSet=l.eMainChannelSet.Event l.ChannelNameColorUpdated=l.eChannelNameColorUpdated.Event return l end return module


function module.new(vChatService, name)
	local obj = setmetatable({}, methods)

	obj.ChatService = vChatService

	obj.PlayerObj = nil

	obj.Name = name
	obj.ExtraData = {}

	obj.Channels = {}
	obj.MutedSpeakers = {}

	-- Make sure to destroy added binadable events in the InternalDestroy method.
	obj.eDestroyed = Instance.new("BindableEvent")
	obj.eSaidMessage = Instance.new("BindableEvent")
	obj.eReceivedMessage = Instance.new("BindableEvent")
	obj.eMessageDoneFiltering = Instance.new("BindableEvent")
	obj.eReceivedSystemMessage = Instance.new("BindableEvent")
	obj.eChannelJoined = Instance.new("BindableEvent")
	obj.eChannelLeft = Instance.new("BindableEvent")
	obj.eMuted = Instance.new("BindableEvent")
	obj.eUnmuted = Instance.new("BindableEvent")
	obj.eExtraDataUpdated = Instance.new("BindableEvent")
	obj.eMainChannelSet = Instance.new("BindableEvent")
	obj.eChannelNameColorUpdated = Instance.new("BindableEvent")

	obj.Destroyed = obj.eDestroyed.Event
	obj.SaidMessage = obj.eSaidMessage.Event
	obj.ReceivedMessage = obj.eReceivedMessage.Event
	obj.MessageDoneFiltering = obj.eMessageDoneFiltering.Event
	obj.ReceivedSystemMessage = obj.eReceivedSystemMessage.Event
	obj.ChannelJoined = obj.eChannelJoined.Event
	obj.ChannelLeft = obj.eChannelLeft.Event
	obj.Muted = obj.eMuted.Event
	obj.Unmuted = obj.eUnmuted.Event
	obj.ExtraDataUpdated = obj.eExtraDataUpdated.Event
	obj.MainChannelSet = obj.eMainChannelSet.Event
	obj.ChannelNameColorUpdated = obj.eChannelNameColorUpdated.Event

	return obj
end

return module
