Refactored

This commit is contained in:
Malasaur 2025-12-16 01:15:17 +01:00
parent e7248723f5
commit 715d0527bf
No known key found for this signature in database
6 changed files with 327 additions and 106 deletions

View file

@ -0,0 +1,24 @@
import asyncio
from libbot import minecraft, signal
from libsignal import Message, MessageStyle
RSChat = asyncio.run(signal.getGroup("5PlbXaPmWZQkhmuyyC/fkWTy8K+BqomjK7byVDyxmpo="))
@minecraft.onPlayerChat()
async def onMinecraftMessage(player: str, message: str):
await signal.sendMessage(
Message(
f"<{player}> {message}", styles=[MessageStyle(0, len(player) + 2, "BOLD")]
),
RSChat,
)
await minecraft.command("say hi")
@signal.onMessage()
async def onSignalMessage(message: Message):
if message.user and message.user.note and "!rserver" in message.user.note:
username = message.user.last_nickname
await minecraft.command(f"tellraw @a <{username}> {message.text}")