Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Dyscord Webhook is not working?

I was trying to make a discord webhook that will send me players stats in discord, it prints everything I made, but discord webhook bot says nothing and no errors

One of my friend said me that I should use TextFilter service but im not sure

Thank you for help!

local http = game:GetService("HttpService")

local suffixes = {'','K','M','B','T','Qa','Qi','Sx','Sp','Oc','No','Do','Ud','Dd','Td','Qua','Qui','Sxd','Spd','Ocd','Nod','Vg','Ug'}
function Format(val)
	for i=1, #suffixes do
		if tonumber(val) < 10^(i*3) then
			return math.floor(val/((10^((i-1)*3))/100))/(100)..suffixes[i]
		end
	end
end

local TextService = game:GetService("TextService")

while task.wait(15) do
	pcall(function()
		for i,player in pairs(game:GetService("Players"):GetPlayers()) do
			local Data = {
				["Player Name: "] = player.Name,
				["Player Stats: "] = "Tokens: "..Format(player:WaitForChild("PlayerFolder"):WaitForChild("DataFolder"):WaitForChild("Tokens").Value)..' BT: '..Format(player:WaitForChild("PlayerFolder"):WaitForChild("DataFolder"):WaitForChild("BT").Value)
			}
			print(Data)
			Data = http:JSONEncode(Data)
			print(Data)
			http:PostAsync("https://discord.com/api/webhooks/NO WEBHOOK LINK BUT ITS CORRECT", Data)
		end
	end)
end

2 comments

0

i'm pretty sure discord blocked roblox http requests

0

discord has indeed blocked http requests from roblox, due to players overusing the http requests to discord. it will only work in roblox studio.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.