Whitelist bot using linked beam mp account with discord

how can i make auto whitelist bot useing beammp username form your website with there user name linked with discord

not sure exactly how you mean it, but for the beamMP server part something like this could work:

function onInit()
    MP.RegisterEvent(“onPlayerAuth”, “authHandler”)
end
function authHandler(name, role, is_guest, identifiers)
local discordID = identifiers["discord"] 
    if not discordID then
        print("Player " .. name .. " has no Discord ID linked - kicking player")
        return "You need to link your Discord account to BeamMP to join this server."
    end
for line in io.lines("whitelist.txt") do
    if line ==  discordID then
        print(discordID .. " (" .. discordID .. ") in whitelist - allowing to join")
        return 0
    end
end
print(discordID .. " (" .. discordID .. ") NOT in whitelist - kicking player")
return "You need to be on a whitelist and have your discord account linked to BeamMP to join this server."
end

then you’d need to somehow get the ID from a discord user you want to whitelist and put it in whitelist.txt