- API -
postedMessage = reaper.AZ_Slack_PostDirectMessage(token, toUser, message, useMention)
- API Detail-
▼input value
- token(string) : Token (application identifier)
- toUser(string) : Destination user (ID or name)
- message(string) : Message
- useMention(boolean) : Whether to add mentions or not (optional Default: true)
▼output value
- postedMessage(SlackMessage) : sent Message
To use this API, you need to create a Slack Bot. Please refer here for details.
- SCRIPT -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_SILVER")
function showObject(object, depth)
local obj = object
if depth == nil then depth = 0 end
if(type(obj) == "table") then
Msg("")
for k, v in pairs(obj) do
for i = 1, depth, 1 do reaper.ShowConsoleMsg(" ") end
reaper.ShowConsoleMsg(tostring(k) .. " : ")
showObject(v, depth + 4)
end
else
Msg(obj)
end
end
token = "........" -- Bot tokens to be used
channel = "........" -- Channel Name
threadTimeStamp = "1734337098.984219"
message = "Test\ntest"
mentionList = {"!channel", "!xxx", "@yyy"} -- Group name to be mentions、user name
slackMessage = reaper.AZ_Slack_ReplayMessage(token, channel, threadTimeStamp, message, mentionList)
showObject(slackMessage)
Msg(reaper.AZ_GetErrorCode())