|
|
|
@ -19,7 +19,7 @@ import requests,io,random,re,api,crud,datetime,time,telegram
|
|
|
|
|
from os import remove
|
|
|
|
|
#Funcion base, no eliminar
|
|
|
|
|
def typing(chat):
|
|
|
|
|
bot.send_chat_action(chat_id=chat, action=telegram.ChatAction.TYPING)
|
|
|
|
|
context.bot.send_chat_action(chat_id=chat, action=telegram.ChatAction.TYPING)
|
|
|
|
|
|
|
|
|
|
ua = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101'
|
|
|
|
|
ua += ' Firefox/60.0'
|
|
|
|
@ -107,11 +107,9 @@ try:
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
bot=Bot(token)
|
|
|
|
|
|
|
|
|
|
def start(update:Update, context: CallbackContext) -> None:
|
|
|
|
|
"""Inicia el Bot"""
|
|
|
|
|
typing(update.message.chat_id)
|
|
|
|
|
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()
|
|
|
|
@ -125,14 +123,14 @@ def start(update:Update, context: CallbackContext) -> None:
|
|
|
|
|
|
|
|
|
|
def sugerir(update:Update, context: CallbackContext) -> None:
|
|
|
|
|
"""Sugiere que aladan algo o mejoren algo"""
|
|
|
|
|
bot.send_chat_action(chat_id=update.message.chat_id, action=telegram.ChatAction.TYPING)
|
|
|
|
|
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=io.read()
|
|
|
|
|
lan.close()
|
|
|
|
|
except:
|
|
|
|
|
lang="es"
|
|
|
|
|
bot.send_message(chat_id=admin_id,text="El personaje: @"+update.effective_user.username+" hizo una sugerencia: "+" ".join(context.args))
|
|
|
|
|
context.bot.send_message(chat_id=admin_id,text="El personaje: @"+update.effective_user.username+" hizo una sugerencia: "+" ".join(context.args))
|
|
|
|
|
update.reply_text(return_string('finish',))
|
|
|
|
|
|
|
|
|
|
def help(update:Update, context: CallbackContext) -> None:
|
|
|
|
|