Fixed script

This commit is contained in:
retoor 2025-02-01 16:14:56 +01:00
parent 818aca5449
commit 8f891f7d80

View File

@ -40,13 +40,13 @@ from snekbot.bot import Bot
class ExampleBot(Bot):
async def on_join(self, data):
print(f"I joined f{data.channel_uid}!")
print(f"I joined {data.channel_uid}!")
async def on_leave(self, data):
print(f"I left f{data.channel_uid}!")
print(f"I left {data.channel_uid}!")
async def on_ping(self, data):
print(f"Ping from f{data.user_nick}")
print(f"Ping from {data.user_nick}")
await self.send_message(
data.channel_uid,
"I should respond with Bong according to BordedDev. So here, bong!",
@ -57,7 +57,7 @@ class ExampleBot(Bot):
async def on_mention(self, data):
message = data.message[len(self.username) + 2 :]
print(f"Mention from f{data.user_nick}: {message}")
print(f"Mention from {data.user_nick}: {message}")
result = f'Hey {data.user_nick}, Thanks for mentioning me "{message}".'
await self.send_message(data.channel_uid, result)