Skip to content

Instantly share code, notes, and snippets.

@asmaps
Created October 22, 2017 12:21
Show Gist options
  • Save asmaps/0af50e98f311e04366f03af206ec75f3 to your computer and use it in GitHub Desktop.
Save asmaps/0af50e98f311e04366f03af206ec75f3 to your computer and use it in GitHub Desktop.
import asyncio
from asyncirc import irc
bot = irc.connect("chat.freenode.net", 6667, use_ssl=False)
bot.register("NativeBot", "NativeBot", "NativeBot")
bot.join("#nativebot")
@bot.on("message")
def incoming_message(parsed, user, target, text):
bot.say(target, "{}: you said {}".format(user.nick, text))
if __name__ == '__main__':
asyncio.get_event_loop().run_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment