zero00 Posted May 26 Share Posted May 26 (edited) I m new editing Can tell me where error local discordWebhookURL = "https://discord.com/api/webhooks/1244182172018147378/EeF6d0cYPte8J8ppCH#######gpXqBRqmk3ryZD15gWS8965" function sendDiscordMessage(message) sendOptions = { formFields = { content="``` - Date : [ "..showtime().." ]\n - GIVEMONEY Admin : [ " .. username .. " ] has given [ ".. targetUsername .." ] [ ".. targetCharacterName .." ] $ [ ".. amount .." ]\n - Reason : [ ".. reason .. " ]".."```" }, } fetchRemote ( discordWebhookURL, sendOptions, WebhookCallback ) end -- 2 arguments (responseData gives back the response or "ERROR" ) function WebhookCallback(responseData) outputDebugString("(Discord webhook callback): responseData: "..responseData) end -- SendDiscordTestMessage (deletable, it's a sample function) function SendDiscordTestMessage(player, command, ...) local msg = table.concat({...}," ") -- for multiple words sendDiscordMessage(msg) end addCommandHandler("LocalOOC", SendDiscordTestMessage) Edited May 26 by zero00 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now