types

package
v0.0.0-...-ba096a2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Group type where any role can be selected, and multiple can be selected
	GroupTypeAny = 1
	// Group type where only one role can be selected
	GroupTypeExclusive = 2
	// Same as the exclusive group, but can't be removed
	GroupTypeExclusiveNoRemove = 3
	// Same as the exclusive group, but will prevent changing if one of the roles is present
	GroupTypeNoMultiples = 4

	OptionsForGroupType = "ANY, EXC, ENR, NOM"
)
View Source
const RoleCodeLength = 6
View Source
const RoleCodeSearchText = "[code]"

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Id             int
	ServerId       int
	ChannelUid     string
	BotAllowed     bool
	MovePins       bool
	MoveTextPins   bool
	DeletePin      bool
	MoveChannelUid sql.NullString
}

type ChannelRotation

type ChannelRotation struct {
	ChannelUIDList    []string
	CurrentChannelUID string
	ScheduledOperation
}

type GroupType

type GroupType int

type Metric

type Metric struct {
	Id   int
	Type MetricType
	Data json.RawMessage
}

type MetricTimerJson

type MetricTimerJson struct {
	Events []event.TimerMark `json:"events"`
	UserId int               `json:"userId"`
}

type MetricType

type MetricType int

type Permission

type Permission int

Permission enum

const (
	// Default permission level, no permissions regarding what can or can't be done
	PermAll Permission = 2
	// Mod level permission, allowed to do some server changing commands
	PermMod Permission = 50
	// Guild Owner permission. Essentially a master
	PermGuildOwner Permission = 90
	// Used to disable something, no one can have this permission level
	PermNone Permission = 100
	// Master level permission, can't ever be ignored or disabled
	PermMaster Permission = 101
)

type Poll

type Poll struct {
	Id         int
	Options    []*PollOption
	Title      string
	Open       bool
	ChannelId  int
	UserUid    string
	MessageUid string
}

type PollOption

type PollOption struct {
	Id           int
	PollId       int
	ReactionId   string
	ReactionName string
	Description  string
	Votes        int
}

type RaffleEntry

type RaffleEntry struct {
	Id               int
	GuildUid         string
	UserUid          string
	RaffleType       RaffleType
	TicketCount      int
	RaffleData       string
	LastTicketUpdate int64
}

func (*RaffleEntry) SetRaffleData

func (re *RaffleEntry) SetRaffleData(raffleData string)

type RaffleType

type RaffleType int

Raffle type enum

type Role

type Role struct {
	Id                         int
	ServerId                   int
	Groups                     []int
	RoleUid                    string
	Permission                 Permission
	ConfirmationMessage        sql.NullString
	ConfirmationSecurityAnswer sql.NullString
	Trigger                    sql.NullString
}

type RoleGroup

type RoleGroup struct {
	Id       int
	ServerId int
	Name     string
	Type     GroupType
}

type ScheduledOperation

type ScheduledOperation struct {
	ID                   int64
	ServerID             int
	Type                 SchedulerType
	PlannedExecutionTime time.Time
}

type SchedulerType

type SchedulerType int

type Server

type Server struct {
	Id             int
	GuildUid       string
	WelcomeMessage sql.NullString // Message user gets sent when they first join the server, either via PM or public message depending on WelcomeChannel
	RuleAgreement  sql.NullString // Message to type when the user agrees to the rules
	VeteranRank    sql.NullInt64  // Rank at which a user can be promoted to the veteran role
	VeteranRole    sql.NullString // Role to apply when a user can become a veteran
	BotChannel     sql.NullString // Where any bot related information or errors get sent to.
	Enabled        bool           // defaults to true, so that new servers that add moebot can immediately start using her. This can be turned off later
	WelcomeChannel sql.NullString // Channel to post a welcome message. If null, send via PM's
	StarterRole    sql.NullString // The role that is added when someone first joins a server
	BaseRole       sql.NullString // The role that is added when someone types the RuleAgreement message. Should only exist when RuleAgreement isn't null
}

A Server (guild in discord terms) that stores information related to what over server settings are.

type UserProfile

type UserProfile struct {
	Id      int
	UserUid string
}

type UserServerRank

type UserServerRank struct {
	Id          int
	ServerId    int
	UserId      int
	Rank        int
	MessageSent bool
}

type UserServerRankWrapper

type UserServerRankWrapper struct {
	UserUid   string
	ServerUid string
	Rank      int
	SendTo    string
}

Jump to

Keyboard shortcuts

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