我希望我的不和谐机器人能够从命令中检测到提及,即使我可以从机器人发送带有提及的消息,我也无法做到这一点。
你能帮我吗?
通过我使用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>")
}
}