mirror of
https://git.wownero.com/lza_menace/tg-bot.git
synced 2024-08-15 00:23:12 +00:00
19 lines
404 B
Python
19 lines
404 B
Python
from io import BytesIO
|
|
|
|
from PIL import Image
|
|
from base64 import b64encode
|
|
from qrcode import make as qrcode_make
|
|
|
|
from tipbot import config
|
|
|
|
def is_tg_admin(chat_id):
|
|
if chat_id == config.TG_ADMIN_ID:
|
|
return True
|
|
else:
|
|
return False
|
|
|
|
def generate_qr(s):
|
|
_address_qr = BytesIO()
|
|
qrcode_make(s).save(_address_qr, format="PNG")
|
|
_address_qr.seek(0)
|
|
return _address_qr
|