Cannot auto reply with @bot.register()
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()