Skip to content

Commit 3515858

Browse files
committed
Add soundmojis
1 parent 69944d0 commit 3515858

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

discord/mentionable.go

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var (
2222
MentionTypeEveryone = MentionType{regexp.MustCompile(`@everyone`)}
2323
MentionTypeGuildNavigation = MentionType{regexp.MustCompile("<id:(browse|customize|guide|linked-roles)>")}
2424
MentionTypeLinkedRole = MentionType{regexp.MustCompile(`<id:linked-roles:(\d+)>`)}
25+
MentionTypeSoundmoji = MentionType{regexp.MustCompile(`<sound:(\d+):(\d+)>`)}
2526
)
2627

2728
type Mentionable interface {
@@ -92,3 +93,7 @@ func NavigationLinkedRoles() string {
9293
func NavigationLinkedRole(id snowflake.ID) string {
9394
return fmt.Sprintf("<id:linked-roles:%d>", id)
9495
}
96+
97+
func SoundmojiMention(guildID snowflake.ID, soundID snowflake.ID) string {
98+
return fmt.Sprintf("<sound:%d:%d>", guildID, soundID)
99+
}

discord/message.go

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ type Message struct {
122122
Poll *Poll `json:"poll,omitempty"`
123123
Call *MessageCall `json:"call,omitempty"`
124124
Nonce Nonce `json:"nonce,omitempty"`
125+
SoundboardSounds []SoundboardSound `json:"soundboard_sounds,omitempty"`
125126
}
126127

127128
func (m *Message) UnmarshalJSON(data []byte) error {

0 commit comments

Comments
 (0)