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)
|
@signal.onMessage(RChat)
|
||||||
async def onRChatMessage(message: ReceivedMessage):
|
async def onRChatMessage(message: ReceivedMessage):
|
||||||
await minecraft.command(
|
username = message.user.last_nickname or message.user.name
|
||||||
f'tellraw @a "<{message.user.last_nickname or message.user.name}> {message.message.replace('"', '\\"')}"'
|
msg = message.message.replace('"', '\\"')
|
||||||
)
|
await minecraft.command(f'tellraw @a "<{username}> {msg}"')
|
||||||
|
|
||||||
@minecraft.onPlayerChat()
|
@minecraft.onPlayerChat()
|
||||||
async def onRServerMessage(player: str, message: str):
|
async def onRServerMessage(player: str, message: str):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue