Chat API
You must import
phBotChat
to use the chat API.Sends a message to general chat.
Sends a message to the party.
Sends a message to the guild.
Sends a message to the union.
Sends a message to the stall.
Sends a private message to another player.
Sends a note to another player.
Sends a global message.
True
if the message was sent, False
if sending the message failed.from phBot import *
import phBotChat
import QtBind
gui = QtBind.init(__name__, 'Chat Example')
name = QtBind.createLineEdit(gui, '', 10, 10, 100, 20)
text = QtBind.createLineEdit(gui, '', 10, 40, 250, 20)
send = QtBind.createButton(gui, 'send_message', 'Send', 10, 70)
def send_message():
player = QtBind.text(gui, name)
message = QtBind.text(gui, text)
if len(player) > 0 and len(message) > 0:
phBotChat.Private(player, message)
log('[%s] Loaded' % __name__)
Last modified 2yr ago