在不和谐中发现提及

时间:2020-08-06 06:21:09

标签: go discord

我希望我的不和谐机器人能够从命令中检测到提及,即使我可以从机器人发送带有提及的消息,我也无法做到这一点。
你能帮我吗?

通过我使用discordgo的方式,它是用golang编写的

func messageHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
     //instead of " " it should be what will detect mention
     if m.Content == prefix+commands["warning"]+" " {
             fmt.Print("do somethin")
             s.ChannelMessageSend(m.ChannelID, "<@348571774960533508>")
     }
}

0 个答案:

没有答案
相关问题