Am i allowed to use Discord Webhooks for tracking Player Joins

Hello!

Am i allowed to use a discord webhook for my game that tracks the players that join the game, sending their username, id and the time joined?

Here is my script:

local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")

-- Replace with your webhook URL
local webhookURL = "The Webhook"

-- Your Discord user ID (so only you get pinged)
local myID = "I ain't giving ya that"

-- Function to send embed
local function sendDiscordEmbed(player)
    -- Roblox avatar headshot API
    local avatarURL = string.format(
        "https://www.roblox.com/headshot-thumbnail/image?userId=%d&width=420&height=420&format=png",
        player.UserId
    )

    local data = {
        content = "<@" .. myID .. ">", -- ping only you
        embeds = {
            {
                title = "Player Joined",
                description = player.Name .. " has joined the game!",
                color = 0x00FF00, -- green
                thumbnail = {
                    url = avatarURL
                },
                fields = {
                    {
                        name = "User ID",
                        value = tostring(player.UserId),
                        inline = true
                    },
                    {
                        name = "Join Time",
                        value = os.date("%Y-%m-%d %H:%M:%S"),
                        inline = true
                    }
                }
            }
        }
    }

    local jsonData = HttpService:JSONEncode(data)
    HttpService:PostAsync(webhookURL, jsonData, Enum.HttpContentType.ApplicationJson)
end

Players.PlayerAdded:Connect(function(player)
    sendDiscordEmbed(player)
end)

3 Likes

There’s nothing illegal here.
It’s just a regular telemetry.

3 Likes

Only bad is that might get rate limited if you get a ton of joins, discord will block the webhook and if bad enough, ban your account

1 Like

Yeah you’re allowed to use webhooks for that. It’s your own data tracking for your game, not violating ToS.

Just wrap the PostAsync in a pcall so it doesn’t error if the webhook fails or gets rate limited. Discord webhooks have rate limits so if you get a ton of joins fast it might hit that.

local success, err = pcall(function()
    HttpService:PostAsync(webhookURL, jsonData, Enum.HttpContentType.ApplicationJson)
end)

if not success then
    warn("Webhook failed:", err)
end

Honestly though this is pretty useless unless your game has like 5 players. Once you get actual traffic you’ll just get spammed with join notifications constantly.

6 Likes

I used a webhook on the same game. However, my game did get banned so i was not quite sure if it was from this or something else. But good news the game is up and running and i will use the webhook and wrap it in a pcall.

I did look through the community standards and this might be under the sharing personal information off platform.

Nah, sending a Roblox username and user ID to your own webhook isn’t sharing personal info. That’s all public data anyone can see on the platform anyway. Your ban was probably from something else in the game. Webhooks for join tracking are fine.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.