From 17009cde7cd755af42431e5198102f7f44559c78 Mon Sep 17 00:00:00 2001 From: lickthecheese Date: Sun, 5 Apr 2020 11:39:50 -0400 Subject: [PATCH] basic bot --- README.md | 0 bot.py | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) mode change 100644 => 100755 README.md create mode 100755 bot.py diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/bot.py b/bot.py new file mode 100755 index 0000000..bfb4984 --- /dev/null +++ b/bot.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + + +import pydle, asyncio + +class Oven(pydle.Client): + async def on_connect(self): + print('Connected!') + + + await self.join('#bots') + async def on_message(self, chan, source, msg): + if source != self.nickname: + await self.message(chan, ' '.join(await self.whois(source).keys())) + + +if __name__ == "__main__": + client = Oven('oven', realname='Oven IRC Bot') + client.run('irc.tilde.chat', tls=True, tls_verify=False) +