Closed 2Cubed closed 8 years ago
Maybe you want an abstract BaseParser
that can be subclassed to different services BeamParser
, TwitchParser
, etc.
@pylang Yep, that's the plan! :smile:
Currently able to parse most messages, as of 4e19a317a4ba9802634d69e260bebe40ff9ceca7.
Need to decide on how to separate functions that parse incoming packets and outgoing packets, and how to name/call them (similar to on_
?).
Why do you need to parse outgoing packets?
@pylang We're storing packets in a custom format.
MessagePacket(("text", "Derp! "), ("emote", ":stuck_out_tongue:", ":stuck_out_tongue:"))
The above command, !derp
, "was" added by someone using Discord. So, :stuck_out_tongue:
was the :stuck_out_tongue: emote, and it was parsed and stored as such.
Now, someone runs !derp
on Beam. We need to convert the :stuck_out_tongue:
to :P
, and then send.
:smile:
Finished in a44ce6b73a5db1765af53acccdc9cea8a7a2614a, aside from needing to update the roles with accurate values (#54).
BeamParser
will parse incoming data from Beam to a standard packet format (#43).