Skip to content

Instantly share code, notes, and snippets.

@vsec7
Last active April 13, 2022 22:30
Show Gist options
  • Save vsec7/13c62a1dbba6ee162779b9c151cdbefe to your computer and use it in GitHub Desktop.
Save vsec7/13c62a1dbba6ee162779b9c151cdbefe to your computer and use it in GitHub Desktop.
Mass leave discord server
#!/usr/bin/env bash
# DC mass leave server
# Created by github.com/vsec7
# Usage : ./script listtoken
leave(){
g=$(curl -s -X DELETE "https://discordapp.com/api/v6/users/@me/guilds/$1" \
-H "Authorization: $2")
if [ -z $g ]; then
echo "[+] $2 : Success leave"
else
echo "[-] $2 : Failed leave"
fi
}
read -p "[?] List Token : " list
read -p "[?] Guild ID : " gid
read -p "[?] Total : " total
n=1
while read token; do
if [[ $n -le total ]]; then
leave $gid $token
sleep 30 # delay 30 second
fi
n=$[$n+1]
done < $list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment