randydev commited on
Commit
78a4461
·
verified ·
1 Parent(s): 3614c23

Update Akeno/plugins/prefixes.py

Browse files
Files changed (1) hide show
  1. Akeno/plugins/prefixes.py +3 -5
Akeno/plugins/prefixes.py CHANGED
@@ -25,14 +25,12 @@ async def set_prefix(client: Client, message: Message):
25
  for entity in message.entities:
26
  if entity.type == MessageEntityType.CUSTOM_EMOJI and entity.offset >= len(message.text.split()[0]) + 1:
27
  custom_emoji_id = entity.custom_emoji_id
28
- set_prefix_in_db(user_id, custom_emoji_id)
29
  await message.reply_text(f"Custom emoji prefix set to: <emoji id={custom_emoji_id}>🗿</emoji>")
30
  return
31
- else:
32
- return await message.reply_text("You need to be a premium user to set a custom emoji as your prefix!")
33
  if new_prefix_text.lower() == "none":
34
- set_prefix_in_db(user_id, "None")
35
  await message.reply_text("Prefix removed.")
36
  return
37
- set_prefix_in_db(user_id, new_prefix_text)
38
  await message.reply_text(f"Prefix set to: {new_prefix_text}")
 
25
  for entity in message.entities:
26
  if entity.type == MessageEntityType.CUSTOM_EMOJI and entity.offset >= len(message.text.split()[0]) + 1:
27
  custom_emoji_id = entity.custom_emoji_id
28
+ await set_prefix_in_db(user_id, custom_emoji_id)
29
  await message.reply_text(f"Custom emoji prefix set to: <emoji id={custom_emoji_id}>🗿</emoji>")
30
  return
 
 
31
  if new_prefix_text.lower() == "none":
32
+ await set_prefix_in_db(user_id, "None")
33
  await message.reply_text("Prefix removed.")
34
  return
35
+ await set_prefix_in_db(user_id, new_prefix_text)
36
  await message.reply_text(f"Prefix set to: {new_prefix_text}")