beerchat.on_channel_message to broadcast

This commit is contained in:
Freeman 2023-11-19 21:40:26 +01:00
parent e6ea58d7c2
commit 086085beca

@ -112,8 +112,8 @@ function emeraldbank.transfer_emeralds(player1, player2, num)
if core.get_modpath("yl_matterbridge") then
yl_matterbridge.send_to_bridge("EMERALDBANK", msg)
end
if core.get_modpath("beerchat") and beerchat.send_on_channel then
beerchat.send_on_channel({name="EMERALDBANK", channel=beerchat.main_channel_name, message=msg})
if core.get_modpath("beerchat") then
beerchat.on_channel_message(beerchat.main_channel_name, "EMERALDBANK", msg)
end
emeraldbank.add_emeralds(player1, -num)
emeraldbank.add_emeralds(player2, num)