Skip to content

Instantly share code, notes, and snippets.

@kernoeb
Created September 19, 2020 19:43
Show Gist options
  • Save kernoeb/c574fc886bcc48831ce10aa6bab8692a to your computer and use it in GitHub Desktop.
Save kernoeb/c574fc886bcc48831ce10aa6bab8692a to your computer and use it in GitHub Desktop.
Dynamically change the Discord status
import requests, time
from random import randint
headers = {
'authorization': 'mfa.XXXXX', # Discord token
'content-type': 'application/json',
}
a = [['This', '⚙️'], ['Is', '🔔'], ['Illegal', '➡️']]
while True:
for b in a:
data = '{"custom_status":{"text":\"' + b[0] + "\", \"emoji_name\":\"" + b[1] + "\"}}"
requests.patch('https://discord.com/api/v8/users/@me/settings', headers=headers, data=data.encode('utf-8'))
time.sleep(randint(5, 10)) # Every seconds (random between 5 and 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment