Added explanation for the nickname check in the readme

This commit is contained in:
theunkn0wn1 2018-12-24 17:26:59 -08:00 committed by Joshua Salzedo
parent 1a4dbe588a
commit 806ec7e2ff
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class MyOwnBot(pydle.Client):
await self.join('#bottest') await self.join('#bottest')
async def on_message(self, target, source, message): async def on_message(self, target, source, message):
# don't respond to our own messages, as this leads to a positive feedback loop
if source != self.nickname: if source != self.nickname:
await self.message(target, message) await self.message(target, message)