Guest User

Untitled

a guest
Oct 22nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import asyncio
  2. from asyncirc import irc
  3.  
  4. bot = irc.connect("chat.freenode.net", 6667, use_ssl=False)
  5. bot.register("NativeBot", "NativeBot", "NativeBot")
  6. bot.join("#nativebot")
  7.  
  8.  
  9. @bot.on("message")
  10. def incoming_message(parsed, user, target, text):
  11. bot.say(target, "{}: you said {}".format(user.nick, text))
  12.  
  13.  
  14. if __name__ == '__main__':
  15. asyncio.get_event_loop().run_forever()
Add Comment
Please, Sign In to add comment