#Can anyone help me?

9 messages · Page 1 of 1 (latest)

quiet blade
#

This script is for sending messages from players to a chat to record everything a person says, but it only works in the Roblox Studios test and when the game is published and entered on the server for testing, it doesn't work.

local HttpService = game:GetService("HttpService")

local webhookUrl = "https://discord.com/api/webhooks/..."

game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        local payload = {
            content = "[" .. player.Name .. "] " .. message
        }

        local success, response = pcall(function()
            local request = HttpService:RequestAsync({
                Url = webhookUrl,
                Method = "POST",
                Headers = {
                    ["Content-Type"] = "application/json"
                },
                Body = HttpService:JSONEncode(payload),
            })

            return request
        end)

        if not success then
            warn("Erro ao enviar a mensagem para o Discord:", response)
        elseif response and response.StatusCode == 200 then
            print("Mensagem enviada com sucesso para o Discord!")
        else
            if response then
                warn("Erro no código de status:", response.StatusCode, response.StatusMessage)
            else
                warn("Resposta nula ao enviar a mensagem para o Discord.")
            end
        end
    end)
end)
molten gate
#

can you do it like

#

i have no idea how to use http so i cant help you (i only have used jsonEncode and jsonDecode)

molten gate
quiet blade
#

right

scenic horizon
#

You have to use some Roblox-Discord proxy

#

Search it up