Skip to content

Commit

Permalink
Temporarily remove the BOTLOG_CHATID checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
Avinash Reddy authored Jan 4, 2020
1 parent 41193bd commit 0400d38
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions userbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,41 +173,6 @@
lang_code='en')


async def check_botlog_chatid():
if not BOTLOG_CHATID and LOGSPAMMER:
LOGS.info(
"You must set up the BOTLOG_CHATID variable in the config.env or environment variables, for the private error log storage to work."
)
quit(1)

elif not BOTLOG_CHATID and BOTLOG:
LOGS.info(
"You must set up the BOTLOG_CHATID variable in the config.env or environment variables, for the userbot logging feature to work."
)
quit(1)

elif not BOTLOG or not LOGSPAMMER:
return

entity = await bot.get_entity(BOTLOG_CHATID)
if not entity.creator:
if entity.default_banned_rights.send_messages:
LOGS.info(
"Your account doesn't have rights to send messages to BOTLOG_CHATID "
"group. Check if you typed the Chat ID correctly.")
quit(1)


with bot:
try:
bot.loop.run_until_complete(check_botlog_chatid())
except Exception as error:
LOGS.info(
"BOTLOG_CHATID environment variable isn't a "
"valid entity. Check your environment variables/config.env file. "
f"Here's the error log: {error}")
quit(1)

# Global Variables
COUNT_MSG = 0
USERS = {}
Expand Down

0 comments on commit 0400d38

Please sign in to comment.