discord: start typing in a channel on EventUserTyping receive

This commit is contained in:
Qais Patankar
2019-10-02 09:24:43 +01:00
parent f91392780e
commit f2972ef59d
+8
View File
@@ -188,6 +188,14 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {
return "", fmt.Errorf("Could not find channelID for %v", msg.Channel)
}
if msg.Event == config.EventUserTyping {
if b.GetBool("ShowUserTyping") {
err := b.c.ChannelTyping(channelID)
return "", err
}
return "", nil
}
// Make a action /me of the message
if msg.Event == config.EventUserAction {
msg.Text = "_" + msg.Text + "_"