againmusic / Devine /utils /pastebin.py
taslim19
Initial commit
80287e2
raw
history blame contribute delete
529 Bytes
import aiohttp
BASE = "https://batbin.me/"
async def post(url: str, *args, **kwargs):
async with aiohttp.ClientSession() as session:
async with session.post(url, *args, **kwargs) as resp:
try:
data = await resp.json()
except Exception:
data = await resp.text()
return data
async def AnonyBin(text):
resp = await post(f"{BASE}api/v2/paste", data=text)
if not resp["success"]:
return
link = BASE + resp["message"]
return link