Skip to content

Instantly share code, notes, and snippets.

View EricPanDev's full-sized avatar
🎯
pluh

Eric Pan EricPanDev

🎯
pluh
View GitHub Profile
@EricPanDev
EricPanDev / fxtenor.py
Last active May 18, 2024 09:46
Fetches tenor media urls given a gif id since the endpoint to do it through the API doesnt exist. (or I cant find it LOL)
from flask import Flask, jsonify, redirect
from datetime import datetime, timedelta
import requests
CACHE_DURATION = timedelta(hours=1)
cache = {}
app = Flask(__name__)
@EricPanDev
EricPanDev / discord_lootboxes.py
Last active April 3, 2024 01:32
Automatically open discord lootboxes
token = input("Copy and paste user token: ")
import requests, json, base64, time, sys
X_Super = {"client_build_number":280346}
headers = {
'authorization': token,
'x-super-properties': base64.b64encode(json.dumps(X_Super).encode('utf-8')).decode('utf-8'),
}
@EricPanDev
EricPanDev / setguildpronouns.py
Last active January 16, 2026 20:22
Set a discord bot's token via discord's api - guild only.
bot_token = ""
guildid = ""
data = {"pronouns": "pronoun goes here"}
import requests
headers = {"authorization": "Bot " + bot_token, "content-type": "application/json",}
if requests.patch("https://canary.discord.com/api/v9/guilds/" + str(guildid) + "/members/@me", headers=headers, json=data).status_code == 200: print("Bot's Guild Pronouns Changed!")