YES I AM USING A PROXY AND HAVE HTTP SERVICE TURNED ON
Sorry for screaming at you, but most users on the Devforum do not read the entire post. Alright, now on to explain my problem. I am currently using Discord Webhooks for Ban Logs, but the webhook does not fire for some odd reason.
_G.GlobalIdBanPlayer = function(UserId, reason, moderator)
local Data
local Player_ID = "Player_" .. UserId
local Success, err = pcall(function()
Data = DataStore:GetAsync(Player_ID)
end)
if not Data.BanWave then
Data.BanWave = true
Data.Banned = true
local success,err = pcall(DataStore.UpdateAsync, DataStore, "Player_"..UserId, function()
return Data
end)
print(Data) -- Prints Data
local PlrName = game.Players:GetNameFromUserIdAsync(UserId)
local success, err = pcall(function()
WebhookModule.SendBanMessage(PlrName, reason, moderator)
end)
if err then
print(err) -- Nothing is printed here
end
print(PlrName, reason, moderator) -- Never prints anything
end
end
local module = {}
local http = game:GetService("HttpService")
function module.SendBanMessage(PlayerName, Reason, Moderator)
print(PlayerName, Reason, Moderator) - Prints DaMePlayzGames, Hacking, AntiExploits
local HookData = {
["embeds"] = {{
['username'] = PlayerName,
["title"] = PlayerName.." Has Been Banned.",
["description"] = PlayerName.." has been Banned because: "..Reason,
["type"] = "rich",
["color"] = tonumber(0x4287f5),
["fields"] = {
{
["name"] = "__Moderator__",
["value"] = Moderator,
["inline"] = true
}
}
}}
}
HookData = http:JSONEncode(HookData)
http:PostAsync("https://hooks.hyra.io/api/webhooks/", HookData)
print(PlayerName, Reason, Moderator) -- Does not fire
end
return module