Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package twitch
- import "time"
- type Message interface {
- getType() string
- }
- type PRIVMSG struct {
- Text string
- User User
- Channel Channel
- Timestamp time.Time
- }
- func (m *PRIVMSG) getType() string {
- return "PRIVMSG"
- }
- func newPRIVMSG(text string, user User, channel Channel) PRIVMSG {
- return PRIVMSG{
- Text: text,
- User: user,
- Channel: channel,
- Timestamp: time.Now(),
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment