23 lines
658 B
Python
23 lines
658 B
Python
from include import services
|
|
from telegram import Update
|
|
from telegram.ext import Updater, CallbackContext
|
|
|
|
def return_string(lang):
|
|
try:
|
|
return services[lang]
|
|
except:
|
|
try:
|
|
return services['es']
|
|
except:
|
|
return 'Error en modulo myservices'
|
|
|
|
def my_services(update:Update, context: CallbackContext) -> None:
|
|
context.bot.send_chat_action(chat_id=update.message.chat_id, action=telegram.ChatAction.TYPING)
|
|
try:
|
|
lan=io.open(update.effective_user.username,"r")
|
|
lang=lan.read()
|
|
lan.close()
|
|
except:
|
|
lang="es"
|
|
update.message.reply_text(return_string(lang))
|