readme, nix fixes

This commit is contained in:
41666 2025-03-26 01:03:26 -07:00
parent aafe3e2d21
commit 64bd10915b
12 changed files with 102 additions and 23 deletions

View file

@ -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,

View file

@ -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
}

View file

@ -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)
}