Co-authored-by: New-dev0 <New-dev0@users.noreply.github.com> Co-authored-by: Aditya <me@xditya.me> Co-authored-by: Amit Sharma <48654350+buddhhu@users.noreply.github.com> Co-authored-by: sppidy <sppidy@users.noreply.github.com> Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com> Co-authored-by: divkix <divkix@users.noreply.github.com> Co-authored-by: hellboi_atul <hellboi-atul@users.noreply.github.com> Co-authored-by: Programming Error <error@notavailable.live>
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
# Ultroid - UserBot
|
|
# Copyright (C) 2021 TeamUltroid
|
|
#
|
|
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
|
|
# PLease read the GNU Affero General Public License in
|
|
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
|
|
"""
|
|
✘ Commands Available -
|
|
|
|
• `{i}save <reply message>`
|
|
Save that replied msg to ur saved messages box.
|
|
|
|
• `{i}fsave <reply message>`
|
|
Forward that replied msg to ur saved messages.
|
|
"""
|
|
from . import *
|
|
|
|
|
|
@ultroid_cmd(pattern="save$")
|
|
async def saf(e):
|
|
x = await e.get_reply_message()
|
|
if not x:
|
|
return await eod(
|
|
e, "Reply to Any Message to save it to ur saved messages", time=5
|
|
)
|
|
if e.out:
|
|
await e.client.send_message("me", x)
|
|
else:
|
|
await e.client.send_message(e.sender_id, x)
|
|
await eod(e, "Message saved to Your Pm/Saved Messages.", time=5)
|
|
|
|
|
|
@ultroid_cmd(pattern="fsave$")
|
|
async def saf(e):
|
|
x = await e.get_reply_message()
|
|
if not x:
|
|
return await eod(
|
|
e, "Reply to Any Message to save it to ur saved messages", time=5
|
|
)
|
|
if e.out:
|
|
await x.forward_to("me")
|
|
else:
|
|
await x.forward_to(e.sender_id)
|
|
await eod(e, "Message saved to Your Pm/Saved Messages.", time=5)
|