1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 04:24:19 +00:00
arikawa/bot/bot_example_test.go

38 lines
537 B
Go
Raw Normal View History

2021-10-10 18:43:20 +00:00
package bot_test
import (
"time"
"github.com/diamondburned/arikawa/v3/api"
"github.com/diamondburned/arikawa/v3/bot"
)
type duration time.Duration
func (d *duration) Parse(s string) error {
t, err := time.ParseDuration(s)
if err != nil {
return err
}
*d = duration(t)
return nil
}
type Main struct {
*bot.State
}
type pingArgs struct {
Delay duration
}
func (m *Main) Ping(args pingArgs) api.InteractionResponseData {
}
type echoArgs struct {
Message string
}
func (m *Main) Echo(args echoArgs) (string, error) {}