I have an API that I need to get working. It uses Slack, and I want to make a chat system. I own a Moderation Group, and need it so my Staff can talk to people in-game.

function S:ChannelHistory(...)
	local Args = {...}
	local Respo
	if #Args == 1 then
		local ID = Args[1]
		local IDEncode = HS:UrlEncode(ID)
		local URL = "https://slack.com/api/channels.history?token=" .. key .. "&channel=" .. IDEncode
		Respo = HS:GetAsync(URL)
	elseif #Args == 2 then
		local Amount = Args[2]
		local ID = Args[1]
		local AmountEncode = HS:UrlEncode(Amount)
		local IDEncode = HS:UrlEncode(HS)
		local URL = "https://slack.com/api/channels.history?token=" .. key .. "&channel=" .. IDEncode .. "&count=" .. AmountEncode
		Respo = HS:GetAsync(URL)
	end
	local Resp = HS:JSONDecode(Respo)
	return Resp["messages"]
end


3 comments

0

I have a lot more pieces in the API.

0

What's the problem?

0

I need it so I can use a ScreenGUI that is made visible when someone in-game calls. Then, I need it to send the call to Slack.