Created
October 22, 2017 12:21
-
-
Save asmaps/0af50e98f311e04366f03af206ec75f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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