Hello!
I’m currently having an issue using Discord webhooks. I am trying to make a modcall request system, however the issue is that it always errors with error 400. I’ve tried looking up how to use embeds within Discord and I followed them so this should work but doesn’t.
I know my webhook isn’t the issue as I’m able to post a standard message (just using content) without an issue, any help?
modcall.OnServerInvoke = function(player, information) -- I am going to add a cooldown later, no worries about that
local data = {
['embeds'] = {
['author'] = {
['name'] = player.Name;
['url'] = 'https://www.roblox.com/users/'..player.UserId..'/profile';
['icon_url'] = 'http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username='..player.Name;
};
['description'] = 'test'
};
};
data = httpService:JSONEncode(data)
httpService:PostAsync(modcallURL, data) -- modcallURL is the webhook link
end
TIA for any help! ![]()