Skip to content

Instantly share code, notes, and snippets.

@jadc
Created March 21, 2021 01:12
Show Gist options
  • Save jadc/3f6981c85b455aff7f9b77e84c7a6185 to your computer and use it in GitHub Desktop.
Save jadc/3f6981c85b455aff7f9b77e84c7a6185 to your computer and use it in GitHub Desktop.
Discord Pre-defined Message Sender
# have a file named 'lines' (no extension) with a pre-defined message per line
TOKEN=""
CHANNEL=""
say () {
/usr/bin/curl -X POST -H "Authorization: $TOKEN" -H "User-Agent: thiscanbeanything" -H "Content-Type: application/json" -d "{\"content\": \"$1\"}" "https://discordapp.com/api/v6/channels/$CHANNEL/messages"
}
say "$(sort --random-sort lines | head -n 1)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment