Don't transmit typing events from ourselves (slack/discord) (#1056)

This commit is contained in:
Qais Patankar
2020-03-22 17:39:11 +00:00
committed by GitHub
parent 2b7eab629d
commit 98033b1ba7
3 changed files with 17 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ type Bdiscord struct {
c *discordgo.Session
nick string
userID string
guildID string
webhookID string
webhookToken string
@@ -92,6 +93,7 @@ func (b *Bdiscord) Connect() error {
}
serverName := strings.Replace(b.GetString("Server"), "ID:", "", -1)
b.nick = userinfo.Username
b.userID = userinfo.ID
b.channelsMutex.Lock()
for _, guild := range guilds {
if guild.Name == serverName || guild.ID == serverName {