mtilda / techtrans-bot

A Twitch bot that tells you about cool inventions by pulling data from NASA's Technology Transfer API
MIT License
0 stars 0 forks source link

IRC command methods #39

Open mtilda opened 3 years ago

mtilda commented 3 years ago

Write a method of the IRC structure called Dispatch that takes commands (PRIVMSG, WHISPER, PASS, NICK, CAP REQ, JOIN, PONG etc.), content, and metadata and writes IRC lines to the server.

This will abstract and centralize the logic responsible for packaging data into IRC lines before sending to irc.Write().

mtilda commented 3 years ago

We could also accomplish this by writing a method for each command. It seems this may be closer to the standard practice. We can still group them together in irc.go