premium

package
v0.0.0-...-1e1872e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	ID       string       `mapstructure:"id"`
	SKUID    string       `mapstructure:"sku_id"`
	Default  bool         `mapstructure:"default"`
	Features PlanFeatures `mapstructure:"features"`
}

type PlanFeatures

type PlanFeatures struct {
	MaxSavedMessages          int  `mapstructure:"max_saved_messages"`
	MaxActionsPerComponent    int  `mapstructure:"max_actions_per_component"`
	AdvancedActionTypes       bool `mapstructure:"advanced_action_types"`
	AIAssistant               bool `mapstructure:"ai_assistant"`
	CustomBot                 bool `mapstructure:"custom_bot"`
	MaxCustomCommands         int  `mapstructure:"max_custom_commands"`
	IsPremium                 bool `mapstructure:"is_premium"`
	MaxImageUploadSize        int  `mapstructure:"max_image_upload_size"`
	MaxScheduledMessages      int  `mapstructure:"max_scheduled_messages"`
	PeriodicScheduledMessages bool `mapstructure:"periodic_scheduled_messages"`
}

func (*PlanFeatures) Merge

func (f *PlanFeatures) Merge(b PlanFeatures)

type PremiumManager

type PremiumManager struct {
	// contains filtered or unexported fields
}

func New

func (*PremiumManager) GetEntitledUserIDs

func (m *PremiumManager) GetEntitledUserIDs(ctx context.Context) ([]string, error)

func (*PremiumManager) GetPlanByID

func (m *PremiumManager) GetPlanByID(id string) *Plan

func (*PremiumManager) GetPlanBySKUID

func (m *PremiumManager) GetPlanBySKUID(skuID string) *Plan

func (*PremiumManager) GetPlanFeaturesForGuild

func (m *PremiumManager) GetPlanFeaturesForGuild(ctx context.Context, guildID string) (PlanFeatures, error)

func (*PremiumManager) GetPlanFeaturesForUser

func (m *PremiumManager) GetPlanFeaturesForUser(ctx context.Context, userID string) (PlanFeatures, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL