randydev commited on
Commit
4b4237c
·
verified ·
1 Parent(s): 4c58815

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -5
main.py CHANGED
@@ -53,13 +53,11 @@ api = ak.PornoHub(key=API_KEY)
53
 
54
  not_allowed = ["hi", "hello", "hey", "hai", "help"]
55
 
56
- @Client.on_message(filters.incoming & filters.group, group=-1)
57
  async def must_join_channel(bot: Client, msg: Message):
58
  MUST_JOIN = "RendyProjects"
59
  try:
60
- if not (
61
- await check_membership(MUST_JOIN, bot, msg)
62
- ):
63
  force_button = InlineKeyboardMarkup(
64
  [
65
  [
@@ -79,7 +77,7 @@ async def must_join_channel(bot: Client, msg: Message):
79
  reply_markup=force_button
80
  )
81
  await msg.stop_propagation()
82
- except ChatAdminRequired:
83
  pass
84
 
85
  async def check_membership(channel_id, bot, msg):
 
53
 
54
  not_allowed = ["hi", "hello", "hey", "hai", "help"]
55
 
56
+ @Client.on_message(filters.incoming & filters.private)
57
  async def must_join_channel(bot: Client, msg: Message):
58
  MUST_JOIN = "RendyProjects"
59
  try:
60
+ if not await check_membership(MUST_JOIN, bot, msg):
 
 
61
  force_button = InlineKeyboardMarkup(
62
  [
63
  [
 
77
  reply_markup=force_button
78
  )
79
  await msg.stop_propagation()
80
+ except Exception:
81
  pass
82
 
83
  async def check_membership(channel_id, bot, msg):