mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-30 18:53:30 +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"
|
return "#channel"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *ChannelMention) ID() discord.Snowflake {
|
||||||
|
return discord.Snowflake(*m)
|
||||||
|
}
|
||||||
|
|
||||||
type UserMention discord.Snowflake
|
type UserMention discord.Snowflake
|
||||||
|
|
||||||
func (m *UserMention) Parse(arg string) error {
|
func (m *UserMention) Parse(arg string) error {
|
||||||
|
@ -35,6 +39,10 @@ func (m *UserMention) Usage() string {
|
||||||
return "@user"
|
return "@user"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *UserMention) ID() discord.Snowflake {
|
||||||
|
return discord.Snowflake(*m)
|
||||||
|
}
|
||||||
|
|
||||||
type RoleMention discord.Snowflake
|
type RoleMention discord.Snowflake
|
||||||
|
|
||||||
func (m *RoleMention) Parse(arg string) error {
|
func (m *RoleMention) Parse(arg string) error {
|
||||||
|
@ -46,6 +54,10 @@ func (m *RoleMention) Usage() string {
|
||||||
return "@role"
|
return "@role"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *RoleMention) ID() discord.Snowflake {
|
||||||
|
return discord.Snowflake(*m)
|
||||||
|
}
|
||||||
|
|
||||||
func grabFirst(reg *regexp.Regexp,
|
func grabFirst(reg *regexp.Regexp,
|
||||||
item, input string, output *discord.Snowflake) error {
|
item, input string, output *discord.Snowflake) error {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue