So, I’m working on this script right here that’s meant to ban a player that commits an infraction automatically and log it on the discord appropriately, it keeps saying Error 400 Bad Request, which usually reffers to formatting, but I’m literally copying the same exact arguments from another script and that other script works, can any of you guys spot any wrong JSON formatation?
local exploitevent = game.ReplicatedStorage.Events.Admin.Admin
local TrelloAPI = require(game.ServerScriptService.Modules.TrelloAPI)
local BoardID = TrelloAPI:GetBoardID("Guarulhos RP - Banlist")
local banlist = TrelloAPI:GetListID("Bans", BoardID)
local APIModule = require(game.ServerScriptService.Modules.WebhookAPI)
local newWebHook = APIModule.new("webhook ID is placed here properly")
--//
exploitevent.OnServerEvent:connect(function(player, motivo, lugar)
newWebHook:post{
username = "GuaruBOT",
['embeds'] = {
{
['title'] = '**Player Banido**',
['description'] = 'Um jogador foi banido.',
['color'] = 16711680,
['fields'] = {
{
['name'] = 'Moderador',
['value'] = 'SISTEMA',
},
{
['name'] = 'Jogador',
['value'] = player,
},
{
['name'] = 'Motivo',
['value'] = motivo,
}
}
}
}
}
TrelloAPI:AddCard(motivo, player.. '**[Este ban foi executado pelo sistema, o úsuario tentou modificar ou disparar o evento: '..lugar..']**', banlist)
end)