Purpur
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
bot.py
|
|
@ -1,6 +1,5 @@ |
|
|
|
import os |
|
|
|
import discord |
|
|
|
import requests |
|
|
|
import json |
|
|
|
import logging |
|
|
|
import sys |
|
|
@ -50,8 +49,9 @@ async def on_message(message): |
|
|
|
if len(text) > 100000: |
|
|
|
text = text[:99999] |
|
|
|
truncated = True |
|
|
|
req = requests.post('https://bin.birdflop.com/documents', data=text) |
|
|
|
key = json.loads(req.content)['key'] |
|
|
|
async with aiohttp.ClientSession() as session: |
|
|
|
async with session.post('https://bin.birdflop.com/documents', data=text) as req: |
|
|
|
key = json.loads(await req.read())['key'] |
|
|
|
response = "" |
|
|
|
response = response + "https://bin.birdflop.com/" + key |
|
|
|
response = response + "\nRequested by " + message.author.mention |
|
|
|