readme, nix fixes
This commit is contained in:
parent
aafe3e2d21
commit
64bd10915b
12 changed files with 102 additions and 23 deletions
|
@ -21,8 +21,8 @@ type DiscordClient struct {
|
|||
ClientSecret string
|
||||
}
|
||||
|
||||
func NewDiscordClient(clientID, clientSecret, botToken string) DiscordClient {
|
||||
return DiscordClient{
|
||||
func NewDiscordClient(clientID, clientSecret, botToken string) *DiscordClient {
|
||||
return &DiscordClient{
|
||||
ClientID: clientID,
|
||||
ClientSecret: clientSecret,
|
||||
BotToken: botToken,
|
||||
|
|
|
@ -9,10 +9,17 @@ type GuildService struct {
|
|||
client IDiscordClient
|
||||
}
|
||||
|
||||
func NewGuildService(client IDiscordClient) *GuildService {
|
||||
return &GuildService{
|
||||
client: client,
|
||||
}
|
||||
}
|
||||
|
||||
func (gs *GuildService) Client() IDiscordClient {
|
||||
return gs.client
|
||||
}
|
||||
|
||||
func (gs *GuildService) GetGuild(guildID string) (IGuild, error) {
|
||||
// gs.client
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
@ -17,3 +17,8 @@ func (gs *GuildServiceMock) GetGuild(guildID string) (IGuild, error) {
|
|||
|
||||
return args.Get(0).(IGuild), args.Error(1)
|
||||
}
|
||||
|
||||
func (gs *GuildServiceMock) Client() IDiscordClient {
|
||||
args := gs.Called()
|
||||
return args.Get(0).(IDiscordClient)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue