Answer the question
In order to leave comments, you need to log in
How to make a bot in telethon Russian?
When registering an account in telethon, I specify lang_code and system_lang_code "ru", when registering I use Russian proxies, but when bots enter the channel, they are marked as Russian, how can I fix this? Here is the registration code:
ip_socks = const.PROXIES[numb_thrd]["socks_info"]["ip"]
port_socks = const.PROXIES[numb_thrd]["socks_info"]["port"]
username_socks = const.PROXIES[numb_thrd]["socks_info"]["username"]
password_socks = const.PROXIES[numb_thrd]["socks_info"]["password"]
client_ = TelegramClient(
name_path + resp_by_buy["phone"], api_id, api_hash, proxy=(
SOCKS5, ip_socks, port_socks, True,
username_socks, password_socks
),
device_model=random_str(),
lang_code="ru",
system_lang_code="ru"
)
client_.start(phone=resp_by_buy["phone"], code_callback=code_callback, password="1")
sleep(5)
try:
client_(ImportChatInviteRequest("-0qvdxxxxxdiYxx6"))
except Exception as e:
if "already a participant of the chat" not in str(e):
print(f"Ошибка при входе в чат (при регистрации): {e}")
client_.disconnect()
sleep(60*60*24)
client_.disconnect()
# наполняем личность бота
filling_session_class(resp_by_buy["phone"])
session = get_all_sessions()[resp_by_buy["phone"]]
participants = session.execute(session.set_personality, all_participants=all_participants)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question