Server IDs - How Do I Use Them?

Hello, I have just noticed that there are new server ID numbers for games. I am using a report system in my game that sends an Embed to Discord so that my moderators can answer reports, however, JobIDs don’t work. Is there any way to get the server IDs and turn them into a usable link for moderators to use via my code?

image

Code:

module.SendWebhook = function(contentTable)
	if not tostring(contentTable[3]) then return end
	local data = {
		["content"] = ":warning: __**New Report**__ <@&1232812948729106494>"; -- <@&1232812948729106494>
		["embeds"] = {{
			["author"] = {
				["name"] = tostring(contentTable[1]);
				["icon_url"] = "https://www.roblox.com/headshot-thumbnail/image?userId="..Players:GetUserIdFromNameAsync(tostring(contentTable[1])).."&width=150&height=150&format=png"
			};
			["description"] = "**"..tostring(contentTable[1]).." has reported: **"..tostring(contentTable[2]);
			["color"] = tonumber(0xffffff);
			["fields"] = {
				{
					["name"] = "Reported User";
					["value"] = tostring(contentTable[2]);
					["inline"] = true;
				};
				{
					["name"] = "Reason";
					["value"] = tostring(contentTable[3]);
					["inline"] = true;
				};
				{
					["name"] = "Account Age";
					["value"] = Players:GetPlayerByUserId(tonumber(contentTable[4])).AccountAge.." days";
					["inline"] = true;
				};
				{
					["name"] = "Game ID";
					["value"] = tostring(ServerStorage.JoinCode.Value);--tostring(ServerStorage.JoinCode.Value);
					["inline"] = true;
				};
			--	{
					--["name"] = "Server Link";
					--["value"] = "https://www.roblox.com/games/start?placeId=16302670534&launchData="..game.GameId.."/"..game.JobId;--tostring(ServerStorage.JoinCode.Value);
					--["inline"] = true;
			--	};
			};
			["footer"] = {
				["icon_url"] = "";
				["text"] = "Developed by oreal2"
			}
		}}
	}
	HttpService:PostAsync(URL, HttpService:JSONEncode(data))
end

As you can see, I have JobID info commented out, I’d like to put it to use.

1 Like
local ServerID = game.JobId
local value2, value3 = string.match(ServerID, "^[^%-]+%-([^%-]+)-([^%-]+)")
local Result = tostring(value2 .. "-" .. value3)

"https://www.roblox.com/games/start?placeId=16945408969&launchData="..game.GameId.."/"..Result