Initial ThreatLens release
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# Diagnose why VulnForge slash commands aren't showing in Discord.
|
||||
cd ~/vulnforge
|
||||
# Strip Windows CRLF before sourcing .env (otherwise vars carry trailing \r).
|
||||
sed -i 's/\r$//' .env
|
||||
set -a; . ./.env; set +a
|
||||
AUTH="Authorization: Bot $DISCORD_TOKEN"
|
||||
APP_ID=$(curl -s -H "$AUTH" https://discord.com/api/v10/oauth2/applications/@me | python3 -c "import sys,json;print(json.load(sys.stdin)['id'])")
|
||||
echo "=== APP_ID=$APP_ID GUILD_ID=$GUILD_ID ==="
|
||||
echo
|
||||
echo "=== BOT GUILDS ==="
|
||||
curl -s -H "$AUTH" https://discord.com/api/v10/users/@me/guilds | python3 -m json.tool
|
||||
echo
|
||||
echo "=== GLOBAL COMMANDS ==="
|
||||
curl -s -H "$AUTH" "https://discord.com/api/v10/applications/$APP_ID/commands" | python3 -m json.tool
|
||||
echo
|
||||
echo "=== GUILD COMMANDS for $GUILD_ID ==="
|
||||
curl -s -H "$AUTH" "https://discord.com/api/v10/applications/$APP_ID/guilds/$GUILD_ID/commands" | python3 -m json.tool
|
||||
echo
|
||||
echo "=== BOT MEMBER IN GUILD ==="
|
||||
curl -s -H "$AUTH" "https://discord.com/api/v10/guilds/$GUILD_ID/members/$APP_ID" | python3 -m json.tool
|
||||
Reference in New Issue
Block a user