def delete_TG_links(c, m): if check_not_admin(m): m.delete() if m.chat.id not in json_load(path_groups_id): groups = json_load(path_groups_id) groups.append(m.chat.id) json_dump(groups, path_groups_id)
def private_start(c, m): m.reply(json_load(path_msg_text)['start_message'].format( f'[{m.from_user.first_name}](tg://user?id={m.from_user.id})', 'DeleteTGLinkesHEbot'), disable_web_page_preview=True, reply_markup=kmark( [[kbut("עדכוני רובוטים 👽", url="t.me/m100achuzBots")]])) users = json_load(path_users) if m.from_user.id not in users: users.append(m.from_user.id) json_dump(users, path_users)
def add_exception(c, m): if not check_not_admin(m): exceptions = json_load(path_exception_file) if len(m.command) != 2: m.reply(json_load(path_text_msg)['error_formating']) else: try: exceptions[str(m.chat.id)] = m.command[1] json_dump(exceptions, path_exception_file) m.reply( json_load(path_text_msg)['successful_addition'].format( json_load(path_exception_file)[str(m.chat.id)])) except Exception as e: m.reply(f'`{str(e)}`')
def peivate_exce(c, m): m.reply(json_load(path_msg_text)['add_exce_private'])
def private_help(c, m): m.reply(json_load(path_msg_text)['help_message'], disable_web_page_preview=True)