Created
March 21, 2021 01:12
-
-
Save jadc/3f6981c85b455aff7f9b77e84c7a6185 to your computer and use it in GitHub Desktop.
Discord Pre-defined Message Sender
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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