diff --git a/handlers.go b/handlers.go index c2fa31b..d6cfcc6 100644 --- a/handlers.go +++ b/handlers.go @@ -50,7 +50,10 @@ 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) - b.setupMeeting(m.ConvID, m.Id, words, m.Channel.MembersType) + switch words[0] { + 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, "!") { @@ -60,8 +63,6 @@ func (b *bot) chatHandler(m chat1.MsgSummary) { thisCommand := strings.ToLower(strings.Replace(words[0], "!", "", 1)) // decide if this is askind for extended commands switch thisCommand { - case "meeting": - fallthrough case "jitsi": b.setupMeeting(m.ConvID, m.Id, words, m.Channel.MembersType) default: diff --git a/main.go b/main.go index 313d390..ec0cce0 100644 --- a/main.go +++ b/main.go @@ -62,11 +62,6 @@ func (b *bot) registerCommands() { Description: "Starts a meet.jit.si meeting", Usage: "", }, - { - Name: "meeting", - Description: "Starts a meet.jit.si meeting", - Usage: "", - }, }, }, },