react.py 531 B

123456789101112131415161718192021222324252627282930
  1. import requests
  2. from dotenv import load_dotenv
  3. load_dotenv()
  4. import os
  5. BOT_TOKEN = os.getenv("BOT_TOKEN")
  6. channel_id = 952474835538284614
  7. message_id = 952510538552868884
  8. emoji = "%F0%9F%8E%AE"
  9. API_ENDPOINT = 'https://discord.com/api/v8'
  10. headers = {
  11. 'Content-Type': 'application/json',
  12. 'Authorization': f'Bot {BOT_TOKEN}',
  13. }
  14. data = {
  15. # 'content': content,
  16. }
  17. response = requests.put(f'{API_ENDPOINT}/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me', json=data, headers=headers)
  18. print(response.json())