Updated README.

This commit is contained in:
retoor 2025-04-24 21:40:44 +02:00
parent 4d5553468e
commit a98ee86ecd

View File

@ -40,6 +40,7 @@ from snekbot.bot import Bot
class ExampleBot(Bot):
async def on_join(self, channel_uid):
await super().on_join(channel_uid)
print(f"I joined!")
await self.send_message(
channel_uid,
@ -47,6 +48,7 @@ class ExampleBot(Bot):
)
async def on_leave(self, channel_uid):
await super().on_leave(channel_uid)
print(f"I left!!")
await self.send_message(
channel_uid, "I stop actively being part of the conversation now. Bye!"
@ -56,7 +58,7 @@ class ExampleBot(Bot):
print(f"Ping from {user_nick} in channel {channel_uid}: {message}")
await self.send_message(channel_uid, "pong " + message)
async def on_own_message(self, data):
async def on_own_message(self, channel_uid, data):
print(f"Received my own message: {data.message}")
async def on_mention(self, username, user_nick, channel_uid, message):