File size: 4,686 Bytes
21bc372 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# by @xtdevs
from pyrogram import Client as ren
from pyrogram import Client, filters
from pyrogram import *
from pyrogram.types import *
from pyrogram.enums import MessageEntityType
from akn.utils.handler import *
from akn.utils.prefixprem import command
from config import *
custom_verifed = "<emoji id=5850654130497916523>๐ฟ</emoji>"
@Akeno(
~filters.scheduled
& command(["getemoji"])
& filters.me
& ~filters.forwarded
)
async def knowledge_check(client: Client, message: Message):
if not message.reply_to_message:
return
reply_message = message.reply_to_message
if not reply_message.entities:
return
custom_emoji_id = reply_message.entities[0].custom_emoji_id
try:
await message.reply(f"Get emoji ID : `{custom_emoji_id}`")
except Exception as e:
await message.reply(str(e))
return
@Akeno(
~filters.scheduled
& command(["rsetpemoji"])
& filters.me
& ~filters.forwarded
)
async def set_emoji_status_reply(client: Client, message: Message):
if not message.reply_to_message:
return await message.reply_text("Reply to emoji premium status")
reply_message = message.reply_to_message
if not reply_message.entities:
return await message.reply_text("No custom emoji found in the message.")
get_custom_emoji_id = None
for entity in reply_message.entities:
if entity.type == MessageEntityType.CUSTOM_EMOJI:
get_custom_emoji_id = entity.custom_emoji_id
break
if not get_custom_emoji_id:
return await message.reply_text("No custom emoji found in the message.")
if client.me.is_premium:
try:
await client.set_emoji_status(
EmojiStatus(custom_emoji_id=get_custom_emoji_id)
)
await message.reply_text(f"Successfully changed profile emoji status to <emoji id={get_custom_emoji_id}>๐ฟ</emoji>")
except Exception as e:
await message.reply_text(str(e))
else:
await message.reply_text("Non-premium users cannot set custom emojis.")
@Akeno(
~filters.scheduled
& command(["setpemoji"])
& filters.me
& ~filters.forwarded
)
async def set_emoji_status(client: Client, message: Message):
text_get = str(message.command[1]) if len(message.command) > 1 else None
if not text_get:
await message.reply_text(f"Example ?setpemoji {custom_verifed}")
return
if not message.entities:
await message.reply_text("No custom emoji found in the message.")
return
get_custom_emoji_id = None
for entity in message.entities:
if entity.type == MessageEntityType.CUSTOM_EMOJI:
get_custom_emoji_id = entity.custom_emoji_id
break
if not get_custom_emoji_id:
await message.reply_text("No custom emoji found in the message.")
return
if client.me.is_premium:
try:
await client.set_emoji_status(
EmojiStatus(custom_emoji_id=get_custom_emoji_id)
)
await message.reply_text(f"Successfully changed profile emoji status to <emoji id={get_custom_emoji_id}>๐ฟ</emoji>")
except Exception as e:
await message.reply_text(str(e))
else:
await message.reply_text("Non-premium users cannot set custom emojis.")
@Akeno(
~filters.scheduled
& command(["stealpemoji"])
& filters.me
& ~filters.forwarded
)
async def steal_emoji_user(client: Client, message: Message):
if not message.reply_to_message:
await message.reply_text("Reply to a Message")
return
reply_message = message.reply_to_message
if not reply_message.from_user:
await message.reply_text("Reply to a message user")
return
user_id = reply_message.from_user.id if reply_message else "@" + reply_message.from_user.username
user = await client.get_users(user_id)
custom_emoji_id = user.emoji_status.custom_emoji_id
if user.is_premium:
try:
await client.set_emoji_status(
EmojiStatus(
custom_emoji_id=custom_emoji_id
)
)
await message.reply_text(f"Successfully stole your emoji status <emoji id={custom_emoji_id}>๐ฟ</emoji>")
except Exception as e:
await message.reply_text(str(e))
return
else:
await message.reply_text("can't non-premium user")
module = modules_help.add_module("getemoji", __file__)
module.add_command("getemoji", "null.")
module.add_command("rsetpemoji", "null.")
module.add_command("setpemoji", "null.")
module.add_command("stealpemoji", "null") |