fix: lint errors
This commit is contained in:
parent
abcd3c3c44
commit
763a451251
10 changed files with 91 additions and 55 deletions
|
@ -107,9 +107,10 @@ func (p *DicePlugin) rollDice(formula string) (int, error) {
|
|||
return 0, fmt.Errorf("invalid modifier")
|
||||
}
|
||||
|
||||
if matches[3] == "+" {
|
||||
switch matches[3] {
|
||||
case "+":
|
||||
total += modifier
|
||||
} else if matches[3] == "-" {
|
||||
case "-":
|
||||
total -= modifier
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,14 +44,7 @@ func New(creator ReminderCreator) *Reminder {
|
|||
func (r *Reminder) OnMessage(msg *model.Message, config map[string]interface{}) []*model.Message {
|
||||
// Only process replies to messages
|
||||
if msg.ReplyTo == "" {
|
||||
return []*model.Message{
|
||||
{
|
||||
Text: "Please reply to a message with `!remindme <duration>` to set a reminder.",
|
||||
Chat: msg.Chat,
|
||||
Channel: msg.Channel,
|
||||
ReplyTo: msg.ID,
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check if the message is a reminder command
|
||||
|
|
|
@ -161,4 +161,4 @@ func TestReminderOnMessage(t *testing.T) {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,9 +53,7 @@ func (p *InstagramExpander) OnMessage(msg *model.Message, config map[string]inte
|
|||
}
|
||||
|
||||
// Change the host
|
||||
if strings.Contains(parsedURL.Host, "instagram.com") {
|
||||
parsedURL.Host = strings.Replace(parsedURL.Host, "instagram.com", "ddinstagram.com", 1)
|
||||
}
|
||||
parsedURL.Host = strings.Replace(parsedURL.Host, "instagram.com", "ddinstagram.com", 1)
|
||||
|
||||
// Remove query parameters
|
||||
parsedURL.RawQuery = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue