Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make my SlackAPI work for a Chat System?

Asked by 8 years ago
Edited 8 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

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


0
I have a lot more pieces in the API. jam10161 13 — 8y
0
What's the problem? BlueTaslem 18071 — 8y
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. jam10161 13 — 8y

Answer this question