changed command availability

This commit is contained in:
2020-03-18 19:04:16 +00:00
parent 9a7b9156c9
commit 8b9d5897bd
2 changed files with 4 additions and 8 deletions

View File

@ -50,8 +50,11 @@ 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] {
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
@ -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:

View File

@ -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: "",
},
},
},
},