Add message command
This commit is contained in:
parent
1699dc5593
commit
906048a797
|
@ -121,7 +121,7 @@ class IRCCommands(object):
|
|||
@staticmethod
|
||||
def run(cmd, spl, length, authed, msg, agora, revolut, tx):
|
||||
total_usd = revolut.get_total_usd()
|
||||
if not total_usd:
|
||||
if total_usd is False:
|
||||
msg("Error getting total balance.")
|
||||
msg(f"Total: {round(total_usd, 2)}USD")
|
||||
|
||||
|
@ -144,3 +144,14 @@ class IRCCommands(object):
|
|||
msg("No trades.")
|
||||
for trade in trades:
|
||||
msg(trade)
|
||||
|
||||
class message(object):
|
||||
name = "msg"
|
||||
authed = True
|
||||
|
||||
@staticmethod
|
||||
def run(cmd, spl, length, authed, msg, agora, revolut, tx):
|
||||
if length > 2:
|
||||
full_msg = " ".join(spl[2:])
|
||||
rtrn = agora.agora.contact_message_post(spl[1], full_msg)
|
||||
msg(f"Sent {full_msg} to {spl[1]}: {rtrn}")
|
||||
|
|
Loading…
Reference in New Issue