mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 17:23:00 +00:00
Bot: Added (*RawArguments).After
This commit is contained in:
parent
bdcc863d45
commit
0c8c43d3f5
|
@ -49,10 +49,22 @@ func (r *RawArguments) Arg(n int) string {
|
|||
return r.Arguments[n]
|
||||
}
|
||||
|
||||
func (r *RawArguments) After(n int) string {
|
||||
if n < 0 || n >= len(r.Arguments) {
|
||||
return ""
|
||||
}
|
||||
|
||||
return strings.Join(r.Arguments[n:], " ")
|
||||
}
|
||||
|
||||
func (r *RawArguments) String() string {
|
||||
return r.Command + " " + strings.Join(r.Arguments, " ")
|
||||
}
|
||||
|
||||
func (r *RawArguments) Length() int {
|
||||
return len(r.Arguments)
|
||||
}
|
||||
|
||||
// Argument is each argument in a method.
|
||||
type Argument struct {
|
||||
String string
|
||||
|
|
Loading…
Reference in a new issue