basic bot
This commit is contained in:
parent
18561096b3
commit
17009cde7c
2 changed files with 20 additions and 0 deletions
0
README.md
Normal file → Executable file
0
README.md
Normal file → Executable file
20
bot.py
Executable file
20
bot.py
Executable file
|
@ -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)
|
||||
|
Loading…
Reference in a new issue