How can I identify the server and paste it into the webhook message?

Hey everyone, hope you’re staying safe. I’m wondering how I can see if it’s a regular server or a private server to post on the webhook message. I couldn’t find anything regarding to pasting this into the message.

Here’s my code, it’s an Adonis plugin

	local WebhookId 	= "123"
local WebhookToken 	= "ABC123"

server = nil 
service = nil

local Http = game:GetService("HttpService")
local webHook = require(script.WebhookAPI)
local Discord_Webhook = webHook.new(WebhookId,WebhookToken) 
local PlaceName = game:GetService('MarketplaceService'):GetProductInfo(game.PlaceId).Name


return function() 
	
	function LvlFromNum(p)
		local level = server.Admin.GetLevel(p)
		if level >= 4 then
			return 'Creator'
		elseif level >= 3 then 
			return 'Owner'
		elseif level >= 2 then
			return 'Admin'
		elseif level >= 1 then
			return 'Mod'
		else
			return 'Player'
		end	
	end
	
	service.Events.CommandRan:connect(function(p,msg,command,args,index,table,ran,error)
		
		if ran then 
			local arg = ""
			if args and #args > 1 then
				for i,v in pairs(args) do
					arg = arg..","..v
				end
			else
				arg = args[1]
			end
			
			Discord_Webhook:post{
				username = 'Command Logs',
				embeds = {
					{
						description = '**Command:** '..tostring(msg)..'\n**Player:** '..tostring(p.Name..'\n**Adonis Level:** '..LvlFromNum(p))..'\n**Server Type:** ',
						color = 23756,
				
						footer = {
							text = tostring(PlaceName)..' | '..tostring(service.GetTime()),
							icon_url = "https://t6.rbxcdn.com/4c3e256d2b9c79b7ad3ed5228c0dcc09"
						}
					}
				}	
			}
		end
	end)
end


Trying to add it to the “Server Type:” part.

Any help is appreciated, thanks!

You can use PrivateServerId and/or PrivateServerOwnerId to determine if the server is a private server.

If the server is not a private server, PrivateServerOwnerId will be 0 and PrivateServerId will be an empty string

1 Like