1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-28 01:33:10 +00:00

More Bot API improvements

This commit is contained in:
diamondburned (Forefront) 2020-01-21 23:26:46 -08:00
parent 6d4b23ff05
commit d38cf1508a

View file

@ -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 {