Fixed script
This commit is contained in:
parent
818aca5449
commit
8f891f7d80
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user