Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
a2f4386
1
Parent(s):
95bca0f
Update utils.py
Browse files- Powers/plugins/utils.py +4 -4
Powers/plugins/utils.py
CHANGED
@@ -263,16 +263,16 @@ async def paste(content: str):
|
|
263 |
|
264 |
@Gojo.on_message(command("paste"))
|
265 |
async def paste_func(_, message: Message):
|
266 |
-
if message.reply_to_message:
|
267 |
-
|
268 |
-
content = str(r.text)
|
269 |
|
270 |
if not r.text and not r.document:
|
271 |
return await message.reply_text("Only text and documents are supported")
|
272 |
|
273 |
m = await message.reply_text("Pasting...")
|
274 |
|
275 |
-
|
|
|
276 |
if r.document:
|
277 |
if r.document.file_size > 40000:
|
278 |
return await m.edit("You can only paste files smaller than 40KB.")
|
|
|
263 |
|
264 |
@Gojo.on_message(command("paste"))
|
265 |
async def paste_func(_, message: Message):
|
266 |
+
if not message.reply_to_message:
|
267 |
+
content = message.text.split(None, 1)[1]
|
|
|
268 |
|
269 |
if not r.text and not r.document:
|
270 |
return await message.reply_text("Only text and documents are supported")
|
271 |
|
272 |
m = await message.reply_text("Pasting...")
|
273 |
|
274 |
+
if r.text:
|
275 |
+
content = str(r.text)
|
276 |
if r.document:
|
277 |
if r.document.file_size > 40000:
|
278 |
return await m.edit("You can only paste files smaller than 40KB.")
|