Fixed f-string
This commit is contained in:
parent
ae8df30169
commit
e88893bea0
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
|
@ -16,9 +16,9 @@ async def main():
|
|||
|
||||
@signal.onMessage(RChat)
|
||||
async def onRChatMessage(message: ReceivedMessage):
|
||||
await minecraft.command(
|
||||
f'tellraw @a "<{message.user.last_nickname or message.user.name}> {message.message.replace('"', '\\"')}"'
|
||||
)
|
||||
username = message.user.last_nickname or message.user.name
|
||||
msg = message.message.replace('"', '\\"')
|
||||
await minecraft.command(f'tellraw @a "<{username}> {msg}"')
|
||||
|
||||
@minecraft.onPlayerChat()
|
||||
async def onRServerMessage(player: str, message: str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue