Hello Everyone! In my game, it’s a generic Roleplaying Game. I would like to make a Function where inside a UI you can enter text and then it will send to a webhook/embedded message inside the Discord Server.
So far I have an amount of script to tell the Webhook to send a message and the webhook set up inside of the Discord Server. I am a little bit confused on how to make a certain type of UI (For Example TextBox) translate into a script telling the Webhook to make a message including the person who submitted that request and also any information inputted into the UI that is required. If anyone can please help me it would be greatly appreciated.
The Current Script That Is Here
local webHook = {}
webHook.__index = webHook
local Http = game:GetService("HttpService")
local url = Nope
--
function webHook.new(id,key)
local mt = setmetatable({id=id,key=key}, webHook)
return mt
end
function webHook:post(config,host)
local data = nil
local success = pcall(function()
data = Http:JSONEncode(config)
end)
if not success then warn("Cannot convert WebHook to JSON!") return end
Http:PostAsync(url, data)
end
return webHook
local http = game:GetService("HttpService")
game:GetService("Players").PlayerAdded:Connect(function(player)
end)
local url = Nope
local http = game:GetService("HttpService")