Skip to content

Instantly share code, notes, and snippets.

View dev-ruby's full-sized avatar
🎯
Focusing

Eunho Lee dev-ruby

🎯
Focusing
View GitHub Profile
@lykn
lykn / selects_or_dropdowns.md
Last active January 26, 2026 22:48
A gist explaining the right way to make drop down menus/select menus/selects in discord.py v2(version 2.0.0a)

Note: Before we go any further. Let me make this real clear that the following gist uses the OFFICIAL discord.py library and not forks like discord_components, nextcord, etc... So when your using this code but a different library and fuck up don't comment something mean or go to a help channel in the server and say "this gist is misleading" or "bad gist who wrote this" when your at fault, trust me I'm going to fuck you up😅

Just a reminder^^

Related Links:

DPY's Docs

Discord's Docs

@yanqd0
yanqd0 / dl_requests_tqdm.py
Last active November 15, 2025 15:24
Python requests download file with a tqdm progress bar
import requests
from tqdm import tqdm
def download(url: str, fname: str, chunk_size=1024):
resp = requests.get(url, stream=True)
total = int(resp.headers.get('content-length', 0))
with open(fname, 'wb') as file, tqdm(
desc=fname,
total=total,