A while back I was trying to make a script that kicks a player both from a Roblox game and from the discord server, using Roblox. I remember this working at one point but now it is not working, I updated the authorization key and changed the server guild but still nothing, I was wondering if maybe the API changed or something. Here’s the code if you want to take a preview and look for any errors I may have made:
if string.sub(message:lower(), 1, 6) == "!gkick" then
local foundplayer = string.sub(message:lower(), 8)
local plrtokick = getPlayer(foundplayer)
if plrtokick ~= nil then
plrtokick:Kick("Kicked from both Discord and Roblox")
local id = plrtokick.Stats.DiscordID
print(string.format("%d",id.Value))
local response = http:RequestAsync(
{
Url = "https://discord.com/api/v9/guilds/SERVERID/members/"..id.Value,
Method = "DELETE",
Headers = {
authorization = "AUTHORIZATION"
},
print("Workety worked")
}
)
end
end
It seems to me that it is not requesting properly, thought I would love to hear your input on the matter