mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 17:23:00 +00:00
More Bot API improvements
This commit is contained in:
parent
6d4b23ff05
commit
d38cf1508a
|
@ -24,6 +24,10 @@ func (m *ChannelMention) Usage() string {
|
|||
return "#channel"
|
||||
}
|
||||
|
||||
func (m *ChannelMention) ID() discord.Snowflake {
|
||||
return discord.Snowflake(*m)
|
||||
}
|
||||
|
||||
type UserMention discord.Snowflake
|
||||
|
||||
func (m *UserMention) Parse(arg string) error {
|
||||
|
@ -35,6 +39,10 @@ func (m *UserMention) Usage() string {
|
|||
return "@user"
|
||||
}
|
||||
|
||||
func (m *UserMention) ID() discord.Snowflake {
|
||||
return discord.Snowflake(*m)
|
||||
}
|
||||
|
||||
type RoleMention discord.Snowflake
|
||||
|
||||
func (m *RoleMention) Parse(arg string) error {
|
||||
|
@ -46,6 +54,10 @@ func (m *RoleMention) Usage() string {
|
|||
return "@role"
|
||||
}
|
||||
|
||||
func (m *RoleMention) ID() discord.Snowflake {
|
||||
return discord.Snowflake(*m)
|
||||
}
|
||||
|
||||
func grabFirst(reg *regexp.Regexp,
|
||||
item, input string, output *discord.Snowflake) error {
|
||||
|
||||
|
|
Loading…
Reference in a new issue