fix bug bug
This commit is contained in:
parent
154f2fe435
commit
2e7f25995a
1 changed files with 5 additions and 4 deletions
|
@ -22,7 +22,6 @@ async def __pong(
|
|||
"""
|
||||
If the bot is pinged, send "Pong"
|
||||
"""
|
||||
print("pong")
|
||||
if (client.user_name + ':') in message.body:
|
||||
await client.send_message(room.room_id, "Pong")
|
||||
|
||||
|
@ -43,12 +42,14 @@ async def run(
|
|||
"""
|
||||
Format and send the message
|
||||
"""
|
||||
print("foward")
|
||||
if (client.user_name + ':') in message.body:
|
||||
return
|
||||
message = f"{ message.sender_key }: { message.body }"
|
||||
message = f"{ message.sender }: { message.body }"
|
||||
for to_room in config.rooms:
|
||||
await client.send_message(to_room, message)
|
||||
to_room = await client.resolve_room(to_room)
|
||||
|
||||
if to_room.id != from_room.room_id:
|
||||
await client.send_message(to_room.id, message)
|
||||
|
||||
bot = await Client(
|
||||
config.username,
|
||||
|
|
Loading…
Reference in a new issue