Skip to content

Commit 9206c94

Browse files
authored
Add linked roles navigation mention (#387)
1 parent 7ca41a0 commit 9206c94

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

discord/mentionable.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ var (
2020
MentionTypeSlashCommand = MentionType{regexp.MustCompile(`</(\w+) ?((\w+)|(\w+ \w+)):(\d+)>`)}
2121
MentionTypeHere = MentionType{regexp.MustCompile(`@here`)}
2222
MentionTypeEveryone = MentionType{regexp.MustCompile(`@everyone`)}
23-
MentionTypeGuildNavigation = MentionType{regexp.MustCompile("<id:(browse|customize|guide)>")}
23+
MentionTypeGuildNavigation = MentionType{regexp.MustCompile("<id:(browse|customize|guide|linked-roles)>")}
24+
MentionTypeLinkedRole = MentionType{regexp.MustCompile(`<id:linked-roles:(\d+)>`)}
2425
)
2526

2627
type Mentionable interface {
@@ -83,3 +84,11 @@ func NavigationCustomizeMention() string {
8384
func NavigationGuideMention() string {
8485
return "<id:guide>"
8586
}
87+
88+
func NavigationLinkedRoles() string {
89+
return "<id:linked-roles>"
90+
}
91+
92+
func NavigationLinkedRole(id snowflake.ID) string {
93+
return fmt.Sprintf("<id:linked-roles:%d>", id)
94+
}

0 commit comments

Comments
 (0)