Skip to content

Instantly share code, notes, and snippets.

@MTRNord
Created November 30, 2016 19:47
Show Gist options
  • Select an option

  • Save MTRNord/aa47850cfafeaa061d052eb3e8a71b4b to your computer and use it in GitHub Desktop.

Select an option

Save MTRNord/aa47850cfafeaa061d052eb3e8a71b4b to your computer and use it in GitHub Desktop.
//telesync _initialize
try:
bot.register_shared("telesync.add_command", tg_bot.add_command)
except:
print("error sharing!")
//plugin _initialize
bot.call_shared("telesync.add_command", "/iitc", iitc)
//plugin command
try:
bot.ho_bot
except:
def coro_send_message(chat_id, msg):
bot.coro_send_message(chat_id, msg)
conf_id = event.conv_id
conf = event.conv
else:
def coro_send_message(chat_id, msg):
print(chat_id)
bot.sendMessage(chat_id, msg)
ho_bot = bot.ho_bot
tg_bot = bot
print("event by telegram: {}".format(event))
args_dict = args[0]
args = args_dict["params"]
conv_id = event
conv = event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment