Rewritten and finished framework and bot
This commit is contained in:
parent
f045967591
commit
49a9964ec5
7 changed files with 150 additions and 33 deletions
17
modules/minecraft_signal_bridge.py
Normal file
17
modules/minecraft_signal_bridge.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import libminecraft
|
||||
import libsignal
|
||||
import libcommon
|
||||
|
||||
RSBeta = libcommon.Group(
|
||||
"RS Beta", "25a58sEeccxAs7Ka27HZW5Sm3R8zJQcyndLKR6FO7sM=")
|
||||
|
||||
|
||||
@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: <(.*)> (.*)")
|
||||
def minecraftToSignal(usr: str, msg: str):
|
||||
libsignal.sendMessage(f"[{usr}] {msg}", RSBeta)
|
||||
|
||||
|
||||
@libsignal.onMessage(RSBeta)
|
||||
def signalToMinecraft(usr: str, msg: str):
|
||||
print(usr, msg)
|
||||
libminecraft.sendCommand(f"say [{usr}] {msg}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue