Skip to content

Instantly share code, notes, and snippets.

View Umbrien's full-sized avatar
🇺🇦
What's happening?

Umbrien Umbrien

🇺🇦
What's happening?
View GitHub Profile
@Umbrien
Umbrien / telethon-download-channel-media.py
Last active June 12, 2023 22:17
Download Telegram channel media using Telethon
from telethon.sync import TelegramClient
from telethon.tl.functions.messages import GetDialogsRequest
from telethon.tl.functions.channels import GetFullChannelRequest
from telethon.tl.types import InputPeerEmpty
from telethon.errors.rpcerrorlist import SessionPasswordNeededError
from tqdm import tqdm
api_id = '12345678'
api_hash = '123456781234567812345678'
phone_number = '+380123456789'
@Umbrien
Umbrien / telethon-channel-joiner.py
Last active June 6, 2023 23:19
Monitor channel and join to private channel via link
import re
from telethon import events, types
from telethon.sync import TelegramClient
from telethon.tl.functions.channels import JoinChannelRequest
from telethon.tl.functions.messages import ImportChatInviteRequest
from telethon.errors.rpcerrorlist import SessionPasswordNeededError
# Replace the values below with your own API credentials
api_id = '12345678'
@Umbrien
Umbrien / removewater.sh
Last active May 17, 2022 10:47
Remove watermark for generated nft collection
#!/bin/bash
# Usage: ./removewater.sh <collection_name>.zip
# watermark bounds
water_x=330
water_y=160
unzip $1 -d /tmp/nft-collection
@Umbrien
Umbrien / tgme.py
Created May 15, 2020 11:04 — forked from RustemB/tgme.py
tgme
#!/usr/bin/env python3
import urllib.request as ur
import urllib.parse as up
from sys import argv
WEBHOOK_URL = "https://api.telegram.org"
BOT_API = "HERE_YORS_BOT_TOKEN_FROM_BOTFATHER"
DATA = up.urlencode({
'text': ' '.join(argv[1:]),