Multiple meeting lobbies and beta-gated features (3.5.2)
- /meeting add-lobby, remove-lobby, lobbies: up to 10 lobbies per server, capped in the database - Deleted voice channels are dropped from the lobbies - Beta features: registered only in the beta server and usable only with the Beta Tester role (BETA_GUILD_ID, BETA_ROLE_ID); fails closed - /beta (bot owner only) shows how beta access is set up Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
136377d81a
commit
a364435bab
15 files changed
+789
-52
No files matched your search
@@ -14,12 +14,26 @@ func New(settings *settingsrepo.Repo) *Service {
|
||||
return &Service{settings: settings}
|
||||
}
|
||||
|
||||
func (s *Service) SetLobbyChannel(ctx context.Context, guildID int64, lobbyChannelID int64) error {
|
||||
return s.settings.SetMeetingLobbyChannel(ctx, guildID, lobbyChannelID)
|
||||
// MaxLobbies is how many lobbies a server can have.
|
||||
const MaxLobbies = settingsrepo.MaxMeetingLobbies
|
||||
|
||||
// ErrLobbyLimit means the server already has MaxLobbies.
|
||||
var ErrLobbyLimit = settingsrepo.ErrMeetingLobbyLimit
|
||||
|
||||
func (s *Service) AddLobby(ctx context.Context, guildID, channelID int64) (added bool, err error) {
|
||||
return s.settings.AddMeetingLobby(ctx, guildID, channelID)
|
||||
}
|
||||
|
||||
func (s *Service) GetLobbyChannel(ctx context.Context, guildID int64) (channelID int64, ok bool, err error) {
|
||||
return s.settings.GetMeetingLobbyChannel(ctx, guildID)
|
||||
func (s *Service) RemoveLobby(ctx context.Context, guildID, channelID int64) (removed bool, err error) {
|
||||
return s.settings.RemoveMeetingLobby(ctx, guildID, channelID)
|
||||
}
|
||||
|
||||
func (s *Service) ListLobbies(ctx context.Context, guildID int64) ([]int64, error) {
|
||||
return s.settings.ListMeetingLobbies(ctx, guildID)
|
||||
}
|
||||
|
||||
func (s *Service) IsLobby(ctx context.Context, guildID, channelID int64) (bool, error) {
|
||||
return s.settings.IsMeetingLobby(ctx, guildID, channelID)
|
||||
}
|
||||
|
||||
func (s *Service) AddTempChannel(ctx context.Context, guildID, channelID, createdBy int64) error {
|
||||
|
||||
Reference in new issue
Block a user