Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Cannot auto reply with @bot.register() #452

Open
sjt-moon opened this issue Apr 14, 2020 · 0 comments
Open

Cannot auto reply with @bot.register() #452

sjt-moon opened this issue Apr 14, 2020 · 0 comments

Comments

@sjt-moon
Copy link

I created a bot and added a method to send msg back to friend with @bot.register(friend), however, it cannot echo message back, no matter I use embed() or bot.join(). If I use embed, then in the console I can send msg with friend variable.

bot = Bot()
friend = bot.search('kakaluote')[0]
@bot.register(friend)
def print_msg(msg):
  print('[Received]: ' % msg)
  msg = '[AutoEcho]: ' + str(msg)
  friend.send(msg)

bot.join()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant