interactions yay!!
This commit is contained in:
parent
b9a05bedf9
commit
f60033a3e4
30 changed files with 716 additions and 44 deletions
21
discord/guild_mock.go
Normal file
21
discord/guild_mock.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package discord
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type GuildMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (g *GuildMock) GetMember(ctx context.Context, memberID string) (IMember, error) {
|
||||
args := g.Called(ctx, memberID)
|
||||
|
||||
if args.Get(0) == nil {
|
||||
return nil, args.Error(1)
|
||||
}
|
||||
|
||||
return args.Get(0).(IMember), args.Error(1)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue