Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
b8d3f5c
1
Parent(s):
c32be54
Update utils.py
Browse files- Powers/plugins/utils.py +3 -3
Powers/plugins/utils.py
CHANGED
|
@@ -265,15 +265,15 @@ async def paste(content: str):
|
|
| 265 |
async def paste_func(_, message: Message):
|
| 266 |
if message.reply_to_message:
|
| 267 |
r = message.reply_to_message
|
|
|
|
| 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 |
-
|
| 275 |
-
|
| 276 |
-
elif r.document:
|
| 277 |
if r.document.file_size > 40000:
|
| 278 |
return await m.edit("You can only paste files smaller than 40KB.")
|
| 279 |
|
|
|
|
| 265 |
async def paste_func(_, message: Message):
|
| 266 |
if message.reply_to_message:
|
| 267 |
r = message.reply_to_message
|
| 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.")
|
| 279 |
|