Question About Output

Good morning everyone!

So today I was wondering, is there a way to post your output in discord via a webhook? If so, how?

Thanks,
Ben

Yeah, use LogService.MessageOut to detect there’s anything printed in the output (according to roblox, this is unreliable, and yes you can check what was the type of the message)

DevHub:

You can use LogService as @RocketB0ii replied, I never really tried this out until now. It worked it out pretty well, here is the code if you want you can try it too.

local HttpServ = game:GetService('HttpService')
local url = yourWebhookURL
local msg = Instance.new("Message", workspace)
game:GetService("LogService").MessageOut:Connect(function(Message, Type)
	msg.Text = "The message was "..Message.." and the type was "..tostring(Type)
	local data = {
		["type"] = "rich",
		["content"] = "**Error**: "..msg.Text,
		["tts"] = false,
	}
	local newdata = HttpServ:JSONEncode(data)

	HttpServ:PostAsync(url, newdata)
end)


1 Like