Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop
This commit is contained in:
commit
20240f3915
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ type Message struct {
|
|||
Content string `json:"content"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
EditedTimestamp string `json:"edited_timestamp"`
|
||||
MentionRoles []string `json:"mention_roles"`
|
||||
Tts bool `json:"tts"`
|
||||
MentionEveryone bool `json:"mention_everyone"`
|
||||
Author *User `json:"author"`
|
||||
|
@ -77,6 +78,8 @@ func (m *Message) ContentWithMentionsReplaced() string {
|
|||
for _, user := range m.Mentions {
|
||||
content = strings.Replace(content, fmt.Sprintf("<@%s>", user.ID),
|
||||
fmt.Sprintf("@%s", user.Username), -1)
|
||||
content = strings.Replace(content, fmt.Sprintf("<@!%s>", user.ID),
|
||||
fmt.Sprintf("@%s", user.Username), -1)
|
||||
}
|
||||
return content
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue