Files
velox-bot/internal/db/services/defaultrole/service.go
T
FernandoJVideira 4080ce8aec feat: add default role management functionality
- Introduced a new default role service and repository for managing default roles assigned to new members.
- Added command to set the default role through the bot's configuration.
- Implemented event handling to assign the default role to new guild members upon joining.
- Updated main application to include the new default role service in the bot's services.
2026-03-18 05:12:40 +00:00

25 lines
470 B
Go

package defaultrole
import (
"context"
"velox-bot/internal/db/repos/defaultrolerepo"
)
type Service struct {
repo *defaultrolerepo.Repo
}
func New(repo *defaultrolerepo.Repo) *Service {
return &Service{repo: repo}
}
func (s *Service) GetRole(ctx context.Context, guildID int64) (int64, error) {
return s.repo.GetRole(ctx, guildID)
}
func (s *Service) SetRole(ctx context.Context, guildID, roleID int64) error {
return s.repo.SetRole(ctx, guildID, roleID)
}