Browse Source

fixed @name syntax for meet

master
David Haukeness 5 years ago
parent
commit
6da584cefa
No known key found for this signature in database
GPG Key ID: 54F2372DDB7F9462
  1. 4
      handlers.go

4
handlers.go

@ -50,11 +50,13 @@ func (b *bot) chatHandler(m chat1.MsgSummary) { @@ -50,11 +50,13 @@ func (b *bot) chatHandler(m chat1.MsgSummary) {
// if the message is @myusername just perform the default function
if strings.HasPrefix(m.Content.Text.Body, fmt.Sprintf("@%s", b.k.Username)) {
words := strings.Fields(m.Content.Text.Body)
switch words[0] {
if len(words) > 1 {
switch words[1] {
case "meet":
b.setupMeeting(m.ConvID, m.Id, words, m.Channel.MembersType)
}
}
}
// its a command for me, iterate through extended commands
if strings.HasPrefix(m.Content.Text.Body, "!") {
// break up the message into words

Loading…
Cancel
Save