Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
6324a2a
1
Parent(s):
dacd977
Update utils.py
Browse files- Powers/plugins/utils.py +4 -4
Powers/plugins/utils.py
CHANGED
@@ -248,13 +248,13 @@ async def github(_, m: Message):
|
|
248 |
|
249 |
|
250 |
pattern = re.compile(r"^text/|json$|yaml$|xml$|toml$|x-sh$|x-shellscript$")
|
251 |
-
BASE = "https://
|
252 |
|
253 |
async def paste(content: str):
|
254 |
-
resp = await post(f"{BASE}api/
|
255 |
-
if not resp["
|
256 |
return
|
257 |
-
return BASE + resp["
|
258 |
|
259 |
|
260 |
@Gojo.on_message(command("paste"))
|
|
|
248 |
|
249 |
|
250 |
pattern = re.compile(r"^text/|json$|yaml$|xml$|toml$|x-sh$|x-shellscript$")
|
251 |
+
BASE = "https://nekobin.com/"
|
252 |
|
253 |
async def paste(content: str):
|
254 |
+
resp = await post(f"{BASE}api/documents", data=content)
|
255 |
+
if not resp["ok"]:
|
256 |
return
|
257 |
+
return BASE + resp["ok"]["key"]
|
258 |
|
259 |
|
260 |
@Gojo.on_message(command("paste"))
|