V
V
vante_scribaxxi2018-06-25 21:44:24
Python
vante_scribaxxi, 2018-06-25 21:44:24

How to choose a language in a telegram bot with 10k+ users?

I want to make a choice of language in my bot. I found one question on the toaster, and following the example of the author, I made something like this dict:

"language": {
      "eng": "language",
      "rus": "язык"
    },

Then I made something like this
await def get_text(q:{}, uid=None, lang=""):
  if uid: #Если имеется id-телеграм юзера, тогда
    # Ищем этого пользователя в бд
    # Узнаем его язык
    # Сохраняем в lang
    pass
  return q[lang]

Question: Will there be problems due to the fact that the bot accesses the database (postgresql) so often?
And at the same time one more: Will there be problems with such a load on aiogram?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question