Captain Ezio commited on
Commit
8171e04
·
1 Parent(s): 63af9c0

Update flood.py

Browse files
Files changed (1) hide show
  1. Powers/plugins/flood.py +4 -2
Powers/plugins/flood.py CHANGED
@@ -98,7 +98,8 @@ limit_kb = InlineKeyboardMarkup(
98
  async def flood_action(c: Gojo, m: Message):
99
  bot = await c.get_chat_member(m.chat.id, Config.BOT_ID)
100
  status = bot.status
101
- if not status in [CMS.OWNER, CMS.ADMINISTRATOR] and not bot.privileges.can_restrict_members:
 
102
  return await m.reply_text("Give me permission to restict member first")
103
  if m.chat.type == CT.PRIVATE:
104
  await m.reply_text("Use this command in group")
@@ -119,7 +120,8 @@ async def flood_action(c: Gojo, m: Message):
119
  async def flood_set(c: Gojo, m: Message):
120
  bot = await c.get_chat_member(m.chat.id, Config.BOT_ID)
121
  status = bot.status
122
- if not status in [CMS.OWNER, CMS.ADMINISTRATOR] and not bot.privileges.can_restrict_members:
 
123
  return await m.reply_text("Give me permission to restict member first")
124
  if m.chat.type == CT.PRIVATE:
125
  return await m.reply_text("This command is ment to be used in groups.")
 
98
  async def flood_action(c: Gojo, m: Message):
99
  bot = await c.get_chat_member(m.chat.id, Config.BOT_ID)
100
  status = bot.status
101
+ if not status in [CMS.OWNER, CMS.ADMINISTRATOR]:
102
+ if not bot.privileges.can_restrict_members:
103
  return await m.reply_text("Give me permission to restict member first")
104
  if m.chat.type == CT.PRIVATE:
105
  await m.reply_text("Use this command in group")
 
120
  async def flood_set(c: Gojo, m: Message):
121
  bot = await c.get_chat_member(m.chat.id, Config.BOT_ID)
122
  status = bot.status
123
+ if not status in [CMS.OWNER, CMS.ADMINISTRATOR]:
124
+ if not bot.privileges.can_restrict_members:
125
  return await m.reply_text("Give me permission to restict member first")
126
  if m.chat.type == CT.PRIVATE:
127
  return await m.reply_text("This command is ment to be used in groups.")