forked from MadeByThePinsHub/Nana-Remix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging the branch (MadeByThePinsHub#39)
* cleanup * Lydia in PM now uwu Fixed issues with Lydia not working in Private Messages * Adding Updater for non Heroku Users to Assistant
- Loading branch information
1 parent
e1aa0b4
commit fd076bb
Showing
7 changed files
with
113 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
import requests | ||
|
||
import aiohttp | ||
|
||
async def deldog(message, data): | ||
BASE_URL = 'https://del.dog' | ||
r = requests.post(f'{BASE_URL}/documents', data=data.encode('utf-8')) | ||
if r.status_code == 404: | ||
await message.edit('Failed to reach dogbin') | ||
r.raise_for_status() | ||
res = r.json() | ||
if r.status_code != 200: | ||
await message.edit(res['message']) | ||
r.raise_for_status() | ||
key = res['key'] | ||
if res['isUrl']: | ||
reply = f'Shortened URL: {BASE_URL}/{key}\nYou can view stats, etc. [here]({BASE_URL}/v/{key})' | ||
else: | ||
reply = f'{BASE_URL}/{key}' | ||
BASE_URL = 'https://nekobin.com' | ||
async with aiohttp.ClientSession() as session: | ||
async with session.post(f'{BASE_URL}/api/documents', json={"content":data}, timeout=3) as response: | ||
key = (await response.json())["result"]["key"] | ||
reply = f'{BASE_URL}/raw/{key}' | ||
return reply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters