Update Akeno/utils/prefixprem.py
Browse files
Akeno/utils/prefixprem.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import re
|
2 |
from pyrogram import Client, Message
|
3 |
from Akeno.utils.base_sqlite import *
|
|
|
4 |
|
5 |
def command(commands: Union[str, List[str]], case_sensitive: bool = False):
|
6 |
command_re = re.compile(
|
@@ -20,7 +21,7 @@ def command(commands: Union[str, List[str]], case_sensitive: bool = False):
|
|
20 |
stored_prefix = get_prefix(user_id)
|
21 |
if message.entities and stored_prefix:
|
22 |
for entity in message.entities:
|
23 |
-
if entity.type ==
|
24 |
without_prefix = text[entity.length:]
|
25 |
for cmd in flt.commands:
|
26 |
if re.match(
|
|
|
1 |
import re
|
2 |
from pyrogram import Client, Message
|
3 |
from Akeno.utils.base_sqlite import *
|
4 |
+
from pyrogram.enums import MessageEntityType
|
5 |
|
6 |
def command(commands: Union[str, List[str]], case_sensitive: bool = False):
|
7 |
command_re = re.compile(
|
|
|
21 |
stored_prefix = get_prefix(user_id)
|
22 |
if message.entities and stored_prefix:
|
23 |
for entity in message.entities:
|
24 |
+
if entity.type == MessageEntityType.CUSTOM_EMOJI and entity.custom_emoji_id == stored_prefix:
|
25 |
without_prefix = text[entity.length:]
|
26 |
for cmd in flt.commands:
|
27 |
if re.match(
|