models

package
v0.0.0-...-07de05f Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ElasticIndexMessages           = "robyul-messages-v2"
	ElasticIndexJoins              = "robyul-joins"
	ElasticIndexLeaves             = "robyul-leaves"
	ElasticIndexPresenceUpdates    = "robyul-presence_updates"
	ElasticIndexVanityInviteClicks = "robyul-vanity_invite_clicks"
	ElasticIndexVoiceSessions      = "robyul-voice_session"
	ElasticIndexEventlogs          = "robyul-eventlogs"
)
View Source
const (
	EventlogTypeMemberJoin    = "Member_Join"    // EventlogTargetTypeUser
	EventlogTypeMemberLeave   = "Member_Leave"   // EventlogTargetTypeUser
	EventlogTypeChannelCreate = "Channel_Create" // EventlogTargetTypeChannel
	EventlogTypeChannelDelete = "Channel_Delete" // EventlogTargetTypeChannel, reversible
	EventlogTypeChannelUpdate = "Channel_Update" // EventlogTargetTypeChannel, reversible
	EventlogTypeRoleCreate    = "Role_Create"    // EventlogTargetTypeRole
	EventlogTypeRoleDelete    = "Role_Delete"    // EventlogTargetTypeRole
	EventlogTypeBanAdd        = "Ban_Add"        // EventlogTargetTypeUser
	EventlogTypeBanRemove     = "Ban_Remove"     // EventlogTargetTypeUser
	EventlogTypeEmojiCreate   = "Emoji_Create"   // EventlogTargetTypeEmoji
	EventlogTypeEmojiDelete   = "Emoji_Delete"   // EventlogTargetTypeEmoji, reversible
	EventlogTypeEmojiUpdate   = "Emoji_Update"   // EventlogTargetTypeEmoji, reversible
	EventlogTypeGuildUpdate   = "Guild_Update"   // EventlogTargetTypeGuild, reversible
	EventlogTypeMemberUpdate  = "Member_Update"  // EventlogTargetTypeUser, reversible
	EventlogTypeRoleUpdate    = "Role_Update"    // EventlogTargetTypeRole, reversible

	EventlogTypeInvitePosted = "Invite_Posted" // EvenlogTargetTypeGuild

	EventlogTargetTypeUser                             = "user"
	EventlogTargetTypeChannel                          = "channel"
	EventlogTargetTypeRole                             = "role"
	EventlogTargetTypeEmoji                            = "emoji"
	EventlogTargetTypeGuild                            = "guild"
	EventlogTargetTypeMessage                          = "message"
	EventlogTargetTypeInviteCode                       = "invite_code"
	EventlogTargetTypePermissionOverwrite              = "permission_overwrite"
	EventlogTargetTypeRolePermissions                  = "role_permissions"
	EventlogTargetTypeVerificationLevel                = "verification_level"
	EventlogTargetTypeGuildDefaultMessageNotifications = "guild_default_message_notifications"
	EventlogTargetTypeChannelType                      = "channel_type"

	EventlogTypeRobyulBadgeCreate                   = "Robyul_Badge_Create"                    // EventlogTargetTypeRobyulBadge
	EventlogTypeRobyulBadgeDelete                   = "Robyul_Badge_Delete"                    // EventlogTargetTypeRobyulBadge
	EventlogTypeRobyulBadgeAllow                    = "Robyul_Badge_Allow"                     // EventlogTargetTypeRobyulBadge
	EventlogTypeRobyulBadgeDeny                     = "Robyul_Badge_Deny"                      // EventlogTargetTypeRobyulBadge
	EventlogTypeRobyulLevelsReset                   = "Robyul_Levels_Reset"                    // EventlogTargetTypeUser
	EventlogTypeRobyulLevelsIgnoreUser              = "Robyul_Levels_Ignore_User"              // EventlogTargetTypeUser
	EventlogTypeRobyulLevelsIgnoreChannel           = "Robyul_Levels_Ignore_Channel"           // EventlogTargetTypeChannel
	EventlogTypeRobyulLevelsProcessedHistory        = "Robyul_Levels_ProcessedHistory"         // EventlogTargetTypeGuild
	EventlogTypeRobyulLevelsRoleAdd                 = "Robyul_Levels_Role_Add"                 // EventlogTargetTypeRole
	EventlogTypeRobyulLevelsRoleApply               = "Robyul_Levels_Role_Apply"               // EventlogTargetTypeGuild
	EventlogTypeRobyulLevelsRoleDelete              = "Robyul_Levels_Role_Delete"              // EventlogTargetTypeRole
	EventlogTypeRobyulLevelsRoleGrant               = "Robyul_Levels_Role_Grant"               // EventlogTargetTypeUser
	EventlogTypeRobyulLevelsRoleDeny                = "Robyul_Levels_Role_Deny"                // EventlogTargetTypeUser
	EventlogTypeRobyulNotificationsChannelIgnore    = "Robyul_Notifications_Channel_Ignore"    // EventlogTargetTypeChannel
	EventlogTypeRobyulVliveFeedAdd                  = "Robyul_Vlive_Feed_Add"                  // EventlogTargetTypeRobyulVliveFeed
	EventlogTypeRobyulVliveFeedRemove               = "Robyul_Vlive_Feed_Remove"               // EventlogTargetTypeRobyulVliveFeed
	EventlogTypeRobyulYouTubeChannelFeedAdd         = "Robyul_YouTube_Channel_Feed_Add"        // EventlogTargetTypeRobyulYouTubeChannelFeed
	EventlogTypeRobyulYouTubeChannelFeedRemove      = "Robyul_YouTube_Channel_Feed_Remove"     // EventlogTargetTypeRobyulYouTubeChannelFeed
	EventlogTypeRobyulInstagramFeedAdd              = "Robyul_Instagram_Feed_Add"              // EventlogTargetTypeRobyulInstagramFeed
	EventlogTypeRobyulInstagramFeedRemove           = "Robyul_Instagram_Feed_Remove"           // EventlogTargetTypeRobyulInstagramFeed
	EventlogTypeRobyulInstagramFeedUpdate           = "Robyul_Instagram_Feed_Update"           // EventlogTargetTypeRobyulInstagramFeed
	EventlogTypeRobyulRedditFeedAdd                 = "Robyul_Reddit_Feed_Add"                 // EventlogTargetTypeRobyulRedditFeed
	EventlogTypeRobyulRedditFeedRemove              = "Robyul_Reddit_Feed_Remove"              // EventlogTargetTypeRobyulRedditFeed
	EventlogTypeRobyulRedditFeedUpdate              = "Robyul_Reddit_Feed_Update"              // EventlogTargetTypeRobyulRedditFeed
	EventlogTypeRobyulFacebookFeedAdd               = "Robyul_Facebook_Feed_Add"               // EventlogTargetTypeRobyulFacebookFeed
	EventlogTypeRobyulFacebookFeedRemove            = "Robyul_Facebook_Feed_Remove"            // EventlogTargetTypeRobyulFacebookFeed
	EventlogTypeRobyulCleanup                       = "Robyul_Cleanup"                         //
	EventlogTypeRobyulMute                          = "Robyul_Mute"                            // EventlogTargetTypeUser
	EventlogTypeRobyulUnmute                        = "Robyul_Unmute"                          // EventlogTargetTypeUser
	EventlogTypeRobyulPostCreate                    = "Robyul_Post_Create"                     // EventlogTargetTypeMessage
	EventlogTypeRobyulPostUpdate                    = "Robyul_Post_Update"                     // EventlogTargetTypeMessage
	EventlogTypeRobyulBatchRolesCreate              = "Robyul_BatchRoles_Create"               // EventlogTargetTypeGuild
	EventlogTypeRobyulAutoInspectsChannel           = "Robyul_AutoInspectsChannel"             // EventlogTargetTypeChannel
	EventlogTypeRobyulPrefixUpdate                  = "Robyul_Prefix_Update"                   // EventlogTargetTypeGuild
	EventlogTypeRobyulChatlogUpdate                 = "Robyul_Chatlog_Update"                  // EventlogTargetTypeGuild
	EventlogTypeRobyulVanityInviteCreate            = "Robyul_VanityInvite_Create"             // EventlogTargetTypeGuild
	EventlogTypeRobyulVanityInviteDelete            = "Robyul_VanityInvite_Delete"             // EventlogTargetTypeGuild
	EventlogTypeRobyulVanityInviteUpdate            = "Robyul_VanityInvite_Update"             // EventlogTargetTypeGuild
	EventlogTypeRobyulBiasConfigCreate              = "Robyul_Bias_Config_Create"              // EventlogTargetTypeChannel
	EventlogTypeRobyulBiasConfigDelete              = "Robyul_Bias_Config_Delete"              // EventlogTargetTypeChannel
	EventlogTypeRobyulBiasConfigUpdate              = "Robyul_Bias_Config_Update"              // EventlogTargetTypeChannel
	EventlogTypeRobyulAutoroleAdd                   = "Robyul_Autorole_Add"                    // EventlogTargetTypeRole
	EventlogTypeRobyulAutoroleRemove                = "Robyul_Autorole_Remove"                 // EventlogTargetTypeRole
	EventlogTypeRobyulAutoroleApply                 = "Robyul_Autorole_Apply"                  // EventlogTargetTypeRole
	EventlogTypeRobyulGuildAnnouncementsJoinSet     = "Robyul_GuildAnnouncements_Join_Set"     // EventlogTargetTypeChannel
	EventlogTypeRobyulGuildAnnouncementsJoinRemove  = "Robyul_GuildAnnouncements_Join_Remove"  // EventlogTargetTypeChannel
	EventlogTypeRobyulGuildAnnouncementsLeaveSet    = "Robyul_GuildAnnouncements_Leave_Set"    // EventlogTargetTypeChannel
	EventlogTypeRobyulGuildAnnouncementsLeaveRemove = "Robyul_GuildAnnouncements_Leave_Remove" // EventlogTargetTypeChannel
	EventlogTypeRobyulGuildAnnouncementsBanSet      = "Robyul_GuildAnnouncements_Ban_Set"      // EventlogTargetTypeChannel
	EventlogTypeRobyulGalleryAdd                    = "Robyul_Gallery_Add"                     // EventlogTargetTypeRobyulGallery
	EventlogTypeRobyulGalleryRemove                 = "Robyul_Gallery_Remove"                  // EventlogTargetTypeRobyulGallery
	EventlogTypeRobyulMirrorCreate                  = "Robyul_Mirror_Create"                   // EventlogTargetTypeRobyulMirror
	EventlogTypeRobyulMirrorDelete                  = "Robyul_Mirror_Delete"                   // EventlogTargetTypeRobyulMirror
	EventlogTypeRobyulMirrorUpdate                  = "Robyul_Mirror_Update"                   // EventlogTargetTypeRobyulMirror
	EventlogTypeRobyulStarboardCreate               = "Robyul_Starboard_Create"                // EventlogTargetTypeChannel
	EventlogTypeRobyulStarboardDelete               = "Robyul_Starboard_Delete"                // EventlogTargetTypeChannel
	EventlogTypeRobyulStarboardUpdate               = "Robyul_Starboard_Update"                // EventlogTargetTypeChannel
	EventlogTypeRobyulRandomPictureSourceCreate     = "Robyul_RandomPicture_Source_Create"     // EventlogTargetTypeRobyulRandomPictureSource
	EventlogTypeRobyulRandomPictureConfigUpdate     = "Robyul_RandomPicture_Config_Update"     // EventlogTargetTypeRobyulRandomPictureSource
	EventlogTypeRobyulRandomPictureSourceRemove     = "Robyul_RandomPicture_Source_Remove"     // EventlogTargetTypeRobyulRandomPictureSource
	EventlogTypeRobyulCommandsAdd                   = "Robyul_Commands_Add"                    // EventlogTargetTypeGuild
	EventlogTypeRobyulCommandsDelete                = "Robyul_Commands_Delete"                 // EventlogTargetTypeGuild
	EventlogTypeRobyulCommandsUpdate                = "Robyul_Commands_Update"                 // EventlogTargetTypeGuild
	EventlogTypeRobyulCommandsJsonExport            = "Robyul_Commands_Json_Export"            // EventlogTargetTypeGuild
	EventlogTypeRobyulCommandsJsonImport            = "Robyul_Commands_Json_Import"            // EventlogTargetTypeGuild
	EventlogTypeRobyulTwitchFeedAdd                 = "Robyul_Twitch_Feed_Add"                 // EventlogTargetTypeRobyulTwitchFeed
	EventlogTypeRobyulTwitchFeedRemove              = "Robyul_Twitch_Feed_Remove"              // EventlogTargetTypeRobyulTwitchFeed
	EventlogTypeRobyulNukeParticipate               = "Robyul_Nuke_Participate"                // EventlogTargetTypeGuild
	EventlogTypeRobyulTroublemakerParticipate       = "Robyul_Troublemaker_Participate"        // EventlogTargetTypeGuild
	EventlogTypeRobyulTroublemakerReport            = "Robyul_Troublemaker_Report"             // EventlogTargetTypeUser
	EventlogTypeRobyulPersistencyBiasRoles          = "Robyul_Persistency_BiasRoles"           // EventlogTargetTypeGuild
	EventlogTypeRobyulPersistencyRoleAdd            = "Robyul_Persistency_Role_Add"            // EventlogTargetTypeRole
	EventlogTypeRobyulPersistencyRoleRemove         = "Robyul_Persistency_Role_Remove"         // EventlogTargetTypeRole
	EventlogTypeRobyulModuleAllowRoleAdd            = "Robyul_Module_Allow_Role_Add"           // EventlogTargetTypeRole
	EventlogTypeRobyulModuleAllowRoleRemove         = "Robyul_Module_Allow_Role_Remove"        // EventlogTargetTypeRole
	EventlogTypeRobyulModuleAllowChannelAdd         = "Robyul_Module_Allow_Channel_Add"        // EventlogTargetTypeChannel
	EventlogTypeRobyulModuleAllowChannelRemove      = "Robyul_Module_Allow_Channel_Remove"     // EventlogTargetTypeChannel
	EventlogTypeRobyulModuleDenyRoleAdd             = "Robyul_Module_Deny_Role_Add"            // EventlogTargetTypeRole
	EventlogTypeRobyulModuleDenyRoleRemove          = "Robyul_Module_Deny_Role_Remove"         // EventlogTargetTypeRole
	EventlogTypeRobyulModuleDenyChannelAdd          = "Robyul_Module_Deny_Channel_Add"         // EventlogTargetTypeChannel
	EventlogTypeRobyulModuleDenyChannelRemove       = "Robyul_Module_Deny_Channel_Remove"      // EventlogTargetTypeChannel
	EventlogTypeRobyulEventlogConfigUpdate          = "Robyul_Module_Eventlog_Config_Update"   // EventlogTargetTypeGuild
	EventlogTypeRobyulTwitterFeedAdd                = "Robyul_Twitter_Feed_Add"                // EventlogTargetTypeRobyulTwitterFeed
	EventlogTypeRobyulTwitterFeedRemove             = "Robyul_Twitter_Feed_Remove"             // EventlogTargetTypeRobyulTwitterFeed
	EventlogTypeRobyulActionRevert                  = "Robyul_Action_Revert"                   // EventlogTargetTypeRobyulEventlogItem

	EventlogTargetTypeRobyulBadge               = "robyul-badge"
	EventlogTargetTypeRobyulVliveFeed           = "robyul-vlive-feed"
	EventlogTargetTypeRobyulYouTubeChannelFeed  = "robyul-youtube-channel-feed"
	EventlogTargetTypeRobyulInstagramFeed       = "robyul-instagram-feed"
	EventlogTargetTypeRobyulRedditFeed          = "robyul-reddit-feed"
	EventlogTargetTypeRobyulFacebookFeed        = "robyul-facebook-feed"
	EventlogTargetTypeRobyulGallery             = "robyul-gallery"
	EventlogTargetTypeRobyulMirror              = "robyul-mirror"
	EventlogTargetTypeRobyulRandomPictureSource = "robyul-randompicture-source"
	EventlogTargetTypeRobyulTwitchFeed          = "robyul-twitch-feed"
	EventlogTargetTypeRobyulTwitterFeed         = "robyul-twitter-feed"
	EventlogTargetTypeRobyulPublicObject        = "robyul-public-object"
	EventlogTargetTypeRobyulMirrorType          = "robyul-mirror-type"
	EventlogTargetTypeRobyulEventlogItem        = "robyul-eventlog-item"

	AuditLogBackfillRedisList = "robyul-discord:eventlog:auditlog-backfills:v2"
)
View Source
const (
	GreeterTable MongoDbCollection = "greeter"

	GreeterTypeJoin GreeterType = iota
	GreeterTypeLeave
	GreeterTypeBan
)
View Source
const (
	Redis_Key_Feature_Levels_Badges  = "robyul2-discord:feature:levels-badges:server:%s"
	Redis_Key_Feature_RandomPictures = "robyul2-discord:feature:randompictures:server:%s"
)
View Source
const (
	TwitterTable MongoDbCollection = "twitter"

	TwitterPostModeRobyulEmbed TwitterPostMode = iota
	TwitterPostModeDiscordEmbed
	TwitterPostModeText
)
View Source
const (
	VanityInvitesTable MongoDbCollection = "vanity_invites"
	// {guildID} resolves to VanityInviteRedisEntry
	VanityInvitesInviteRedisKey = "robyul2-discord:vanityinvites:invite:%s"

	VanityInviteLogChannelKey = "vanityinvite:log:channel-id"
)
View Source
const (
	FeedbackLogChannelKey = "feedback:log:channel-id"
)
View Source
const (
	MirrorsTable = "mirrors"
)

Variables

View Source
var (
	ISO8601 = "2006-01-02T15:04:05-0700"
)

Functions

func CustomCommandsNewObjectName

func CustomCommandsNewObjectName(guildID, userID string) (objectName string)

Types

type AuditLogBackfillRequest

type AuditLogBackfillRequest struct {
	GuildID string               // required
	Type    AuditLogBackfillType // required
	Count   int                  // required
	UserID  string
}

type AuditLogBackfillType

type AuditLogBackfillType int
const (
	AuditLogBackfillTypeChannelCreate AuditLogBackfillType = iota
	AuditLogBackfillTypeChannelDelete
	AuditLogBackfillTypeChannelUpdate
	AuditLogBackfillTypeRoleCreate
	AuditLogBackfillTypeRoleDelete
	AuditLogBackfillTypeBanAdd
	AuditLogBackfillTypeBanRemove
	AuditLogBackfillTypeMemberRemove
	AuditLogBackfillTypeEmojiCreate
	AuditLogBackfillTypeEmojiDelete
	AuditLogBackfillTypeEmojiUpdate
	AuditLogBackfillTypeGuildUpdate
	AuditLogBackfillTypeRoleUpdate
	AuditlogBackfillTypeMemberRoleUpdate
	AuditlogBackfillTypeMemberUpdate
	AuditLogBackfillTypeChannelOverridesAdd
	AuditLogBackfillTypeChannelOverridesRemove
	AuditLogBackfillTypeChannelOverridesUpdate
)

type AutoleaverStateEntry

type AutoleaverStateEntry struct {
	ID      bson.ObjectId `bson:"_id,omitempty"`
	GuildID string
}

type AutoleaverWhitelistEntry

type AutoleaverWhitelistEntry struct {
	ID            bson.ObjectId `bson:"_id,omitempty"`
	AddedAt       time.Time
	GuildID       string
	AddedByUserID string
	Until         time.Time
}

type BiasEntry

type BiasEntry struct {
	ID         bson.ObjectId `bson:"_id,omitempty"`
	GuildID    string        // TODO: renamed from serverID
	ChannelID  string
	Categories []BiasEntryCategory
}

type BiasEntryCategory

type BiasEntryCategory struct {
	Label   string
	Message string
	Pool    string
	Hidden  bool
	Limit   int
	Roles   []BiasEntryRole
}

type BiasEntryRole

type BiasEntryRole struct {
	Name      string
	Print     string
	Aliases   []string
	Reactions []string
}

type BiasGameEntry

type BiasGameEntry struct {
	ID           bson.ObjectId `bson:"_id,omitempty"`
	UserID       string
	GuildID      string
	GameWinner   bson.ObjectId
	RoundWinners []bson.ObjectId
	RoundLosers  []bson.ObjectId
	Gender       string // girl, boy, mixed
	GameType     string // single, multi
}

type BotConfigEntry

type BotConfigEntry struct {
	ID          bson.ObjectId `bson:"_id,omitempty"`
	Key         string
	Value       []byte
	LastChanged time.Time
}

type BotStatusEntry

type BotStatusEntry struct {
	ID            bson.ObjectId `bson:"_id,omitempty"`
	AddedByUserID string
	AddedAt       time.Time
	Text          string
	Type          discordgo.GameType
}

type Config

type Config struct {
	ID bson.ObjectId `bson:"_id,omitempty"`

	// Guild contains the guild ID
	GuildID string

	Prefix string

	CleanupEnabled bool

	AnnouncementsEnabled bool
	// AnnouncementsChannel stores the channel ID
	AnnouncementsChannel string

	WelcomeNewUsersEnabled bool
	WelcomeNewUsersText    string

	MutedRoleName string

	InspectTriggersEnabled InspectTriggersEnabled
	InspectsChannel        string

	NukeIsParticipating bool
	NukeLogChannel      string

	LevelsIgnoredUserIDs          []string
	LevelsIgnoredChannelIDs       []string
	LevelsNotificationCode        string
	LevelsNotificationDeleteAfter int
	LevelsMaxBadges               int

	MutedMembers []string // deprecated

	TroublemakerIsParticipating bool
	TroublemakerLogChannel      string

	AutoRoleIDs      []string
	DelayedAutoRoles []DelayedAutoRole

	StarboardChannelID string
	StarboardMinimum   int
	StarboardEmoji     []string

	ChatlogDisabled bool

	EventlogDisabled   bool
	EventlogChannelIDs []string

	PersistencyBiasEnabled bool
	PersistencyRoleIDs     []string

	RandomPicturesPicDelay                  int
	RandomPicturesPicDelayIgnoredChannelIDs []string

	PerspectiveIsParticipating bool
	PerspectiveChannelID       string

	CustomCommandsEveryoneCanAdd bool
	CustomCommandsAddRoleID      string

	AdminRoleIDs []string
	ModRoleIDs   []string
}

Config is a struct describing all config options a guild may set

func (Config) Default

func (c Config) Default(guild string) Config

Default is a helper for generating default config values

type CustomCommandsEntry

type CustomCommandsEntry struct {
	ID                bson.ObjectId `bson:"_id,omitempty"`
	GuildID           string
	CreatedByUserID   string
	CreatedAt         time.Time
	Triggered         int
	Keyword           string
	Content           string
	StorageObjectName string
	StorageMimeType   string // deprecated
	StorageHash       string // deprecated
	StorageFilename   string // deprecated
}

type DelayedAutoRole

type DelayedAutoRole struct {
	RoleID string
	Delay  time.Duration
}

type DogLinkEntry

type DogLinkEntry struct {
	ID            bson.ObjectId `bson:"_id,omitempty"`
	URL           string        // deprecated
	ObjectName    string
	AddedByUserID string
	AddedAt       time.Time
}

type DonatorEntry

type DonatorEntry struct {
	ID            bson.ObjectId `bson:"_id,omitempty"`
	Name          string
	HeartOverride string
	AddedAt       time.Time
}

type ElasticEventlog

type ElasticEventlog struct {
	CreatedAt  time.Time
	GuildID    string
	TargetID   string
	TargetType string
	UserID     string
	ActionType string
	Reason     string
	Changes    []ElasticEventlogChange
	Options    []ElasticEventlogOption
	WaitingFor struct {
		AuditLogBackfill bool
	}
	EventlogMessages []string
	Reverted         bool
}

type ElasticEventlogChange

type ElasticEventlogChange struct {
	Key      string
	OldValue string
	NewValue string
	Type     string
}

type ElasticEventlogOption

type ElasticEventlogOption struct {
	Key   string
	Value string
	Type  string
}

type ElasticJoin

type ElasticJoin struct {
	CreatedAt      time.Time
	GuildID        string
	UserID         string
	UsedInviteCode string
	VanityInvite   string
}

type ElasticLeave

type ElasticLeave struct {
	CreatedAt time.Time
	GuildID   string
	UserID    string
}

type ElasticLegacyMessage

type ElasticLegacyMessage struct {
	CreatedAt     time.Time
	MessageID     string
	Content       string
	ContentLength int
	Attachments   []string
	UserID        string
	GuildID       string
	ChannelID     string
	Embeds        int
}

type ElasticMessage

type ElasticMessage struct {
	CreatedAt     time.Time
	MessageID     string
	Content       []string
	ContentLength int
	Attachments   []string
	UserID        string
	GuildID       string
	ChannelID     string
	Embeds        int
	Deleted       bool
}

type ElasticPresenceUpdate

type ElasticPresenceUpdate struct {
	CreatedAt  time.Time
	UserID     string
	GameType   int
	GameTypeV2 string
	GameName   string
	GameURL    string
	Status     string
}

type ElasticVanityInviteClick

type ElasticVanityInviteClick struct {
	CreatedAt        time.Time
	VanityInviteName string
	GuildID          string
	Referer          string
}

type ElasticVoiceSession

type ElasticVoiceSession struct {
	CreatedAt       time.Time
	GuildID         string
	ChannelID       string
	UserID          string
	JoinTime        time.Time
	LeaveTime       time.Time
	DurationSeconds int64
}

type FacebookEntry

type FacebookEntry struct {
	ID          bson.ObjectId `bson:"_id,omitempty"`
	GuildID     string
	ChannelID   string
	Username    string
	PostedPosts []FacebookPostEntry
}

type FacebookPostEntry

type FacebookPostEntry struct {
	ID        string
	CreatedAt string
}

type GalleryEntry

type GalleryEntry struct {
	ID              bson.ObjectId `bson:"_id,omitempty"`
	SourceChannelID string
	TargetChannelID string
	GuildID         string
	AddedByUserID   string
}

type GreeterEntry

type GreeterEntry struct {
	Id        bson.ObjectId `bson:"_id,omitempty"`
	GuildID   string
	ChannelID string
	EmbedCode string
	Type      GreeterType
}

type GreeterType

type GreeterType int

type IdolEntry

type IdolEntry struct {
	ID          bson.ObjectId `bson:"_id,omitempty"`
	NameAliases []string
	Name        string
	GroupName   string
	Gender      string
	Images      []IdolImageEntry
	Deleted     bool // there are times when a idol can't be fully deleted cause its used as a reference, in which case this will simply be set to true
	BGGames     int
	BGGameWins  int
	BGRounds    int
	BGRoundWins int
}

type IdolImageEntry

type IdolImageEntry struct {
	HashString string
	ObjectName string
}

type IdolSuggestionEntry

type IdolSuggestionEntry struct {
	ID                bson.ObjectId `bson:"_id,omitempty"`
	UserID            string        // user who made the message
	ProcessedByUserId string
	Name              string
	GrouopName        string
	Gender            string
	ImageURL          string
	ChannelID         string // channel suggestion was made in
	Status            string
	Notes             string // misc notes from
	GroupMatch        bool
	IdolMatch         bool
	LastModifiedOn    time.Time
	ImageHashString   string
	ObjectName        string
}

type InspectTriggersEnabled

type InspectTriggersEnabled struct {
	UserBannedOnOtherServers bool
	UserNoCommonServers      bool
	UserNewlyCreatedAccount  bool
	UserMultipleJoins        bool
	UserBannedDiscordlistNet bool // https://bans.discordlist.net/
	UserJoins                bool
}

type InstagramEntry

type InstagramEntry struct {
	ID                    bson.ObjectId `bson:"_id,omitempty"`
	GuildID               string        // TODO: renamed from ServerID
	ChannelID             string
	Username              string
	InstagramUserID       int64 // deprecated
	InstagramUserIDString string
	PostedPosts           []InstagramPostEntry
	IsLive                bool
	SendPostType          InstagramSendPostType
	LastPostCheck         time.Time
}

type InstagramPostEntry

type InstagramPostEntry struct {
	ID            string
	Type          InstagramPostType
	CreatedAtTime time.Time
}

type InstagramPostType

type InstagramPostType int
const (
	InstagramPostTypePost InstagramPostType = iota
	InstagramPostTypeReel
)

type InstagramSendPostType

type InstagramSendPostType int
const (
	InstagramSendPostTypeRobyulEmbed InstagramSendPostType = iota
	InstagramSendPostTypeDirectLinks
)

type LastFmEntry

type LastFmEntry struct {
	ID             bson.ObjectId `bson:"_id,omitempty"`
	UserID         string
	LastFmUsername string
}

type LevelsRoleEntry

type LevelsRoleEntry struct {
	ID         bson.ObjectId `bson:"_id,omitempty"`
	GuildID    string
	RoleID     string
	StartLevel int
	LastLevel  int
}

type LevelsRoleOverwriteEntry

type LevelsRoleOverwriteEntry struct {
	ID      bson.ObjectId `bson:"_id,omitempty"`
	GuildID string
	RoleID  string
	UserID  string
	Type    LevelsRoleOverwriteType
}

type LevelsRoleOverwriteType

type LevelsRoleOverwriteType int
const (
	LevelsRoleOverwriteTypeGrant LevelsRoleOverwriteType = iota
	LevelsRoleOverwriteTypeDeny
)

type LevelsServerusersEntry

type LevelsServerusersEntry struct {
	ID      bson.ObjectId `bson:"_id,omitempty"`
	UserID  string
	GuildID string
	Exp     int64
}

type MirrorChannelEntry

type MirrorChannelEntry struct {
	GuildID   string
	ChannelID string
}

type MirrorEntry

type MirrorEntry struct {
	ID                bson.ObjectId `bson:"_id,omitempty"`
	Type              MirrorType
	ConnectedChannels []MirrorChannelEntry
}

type MirrorType

type MirrorType int
const (
	MirrorTypeLink MirrorType = iota
	MirrorTypeText
)

type ModJoinlogEntry

type ModJoinlogEntry struct {
	ID                        bson.ObjectId `bson:"_id,omitempty"`
	GuildID                   string
	UserID                    string
	JoinedAt                  time.Time
	InviteCodeUsed            string
	InviteCodeCreatedByUserID string
	InviteCodeCreatedAt       time.Time
	VanityInviteUsedName      string
}

type ModulePermissionEntry

type ModulePermissionEntry struct {
	ID       bson.ObjectId `bson:"_id,omitempty"`
	GuildID  string
	Type     string // "channel" or "role"
	TargetID string
	Allowed  ModulePermissionsModule // -1 for unset
	Denied   ModulePermissionsModule // -1 for unset
}

func GetDefaultModulePermission

func GetDefaultModulePermission() (defaultEntry ModulePermissionEntry)

type ModulePermissionsModule

type ModulePermissionsModule int64

type MongoDbCollection

type MongoDbCollection string
const (
	AutoleaverWhitelistTable MongoDbCollection = "autoleaver_whitelist"

	AutoleaverLogChannelKey = "autoleaver:log:channel-id"
)
const (
	OldBiasGameTable MongoDbCollection = "biasgame"
	BiasGameTable    MongoDbCollection = "biasgame_new"
)
const (
	OldIdolsTable        MongoDbCollection = "biasgame_idols"
	IdolTable            MongoDbCollection = "idols"
	IdolSuggestionsTable MongoDbCollection = "biasgame_suggestions"
)
const (
	LevelsRolesTable          MongoDbCollection = "levels_roles"
	LevelsRoleOverwritesTable MongoDbCollection = "levels_roles_overwrites"
)
const (
	LevelsServerusersTable MongoDbCollection = "levels_serverusers"

	UserProfileBackgroundLogChannelKey = "profile-background:log:channel-id"
)
const (
	NotificationsTable                MongoDbCollection = "notifications"
	NotificationsIgnoredChannelsTable MongoDbCollection = "notifications_ignored_channels"
)
const (
	YoutubeChannelTable  MongoDbCollection = "youtube_channels"
	YoutubeQuotaRedisKey                   = "robyul2-discord:youtube:quota"
)
const (
	AutoleaverStateTable MongoDbCollection = "autoleaver_state"
)
const (
	BiasTable MongoDbCollection = "bias"
)
const (
	BotConfigTable MongoDbCollection = "bot_config"
)
const (
	BotStatusTable MongoDbCollection = "bot_status"
)
const (
	CustomCommandsTable MongoDbCollection = "customcommands"
)
const (
	DogLinksTable MongoDbCollection = "dog_links"
)
const (
	DonatorsTable MongoDbCollection = "donators"
)
const (
	FacebookTable MongoDbCollection = "facebook"
)
const (
	GalleryTable MongoDbCollection = "galleries"
)
const (
	GuildConfigTable MongoDbCollection = "guild_configs"
)
const (
	InstagramTable MongoDbCollection = "instagram"
)
const (
	LastFmTable MongoDbCollection = "lastfm"
)
const (
	ModJoinlogTable MongoDbCollection = "mod_joinlog"
)
const (
	ModulePermissionsTable MongoDbCollection = "module_permissions"
)
const (
	NamesTable MongoDbCollection = "names"
)
const (
	NuguGameTable MongoDbCollection = "nugugame"
)
const (
	NukelogTable MongoDbCollection = "nukelog"
)
const (
	PersistencyRolesTable MongoDbCollection = "persistency_roles"
)
const (
	ProfileBackgroundsTable MongoDbCollection = "profile_backgrounds"
)
const (
	ProfileBadgesTable MongoDbCollection = "profile_badges"
)
const (
	ProfileUserdataTable MongoDbCollection = "profile_userdata"
)
const (
	RandompictureSourcesTable MongoDbCollection = "randompicture_sources"
)
const (
	ReactionpollsTable MongoDbCollection = "reactionpolls"
)
const (
	RedditSubredditsTable MongoDbCollection = "reddit_subreddits"
)
const (
	RemindersTable MongoDbCollection = "reminders"
)
const (
	StarboardEntriesTable MongoDbCollection = "starboard_entries"
)
const (
	StorageTable MongoDbCollection = "storage"
)
const (
	TwitchTable MongoDbCollection = "twitch"
)
const (
	UserConfigTable MongoDbCollection = "user_config"
)
const (
	UseruploadsDisabledUsersTable MongoDbCollection = "useruploads_disabled_users"
)
const (
	VliveTable MongoDbCollection = "vlive"
)
const (
	WeatherLastLocationsTable MongoDbCollection = "weather_last_locations"
)

func (MongoDbCollection) String

func (c MongoDbCollection) String() string

type NamesEntry

type NamesEntry struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	ChangedAt time.Time
	GuildID   string
	UserID    string
	Nickname  string
	Username  string
}

type NotificationsEntry

type NotificationsEntry struct {
	ID                bson.ObjectId `bson:"_id,omitempty"`
	Keyword           string
	GuildID           string // can be "global" to affect every guild
	UserID            string
	Triggered         int
	IgnoredGuildIDs   []string
	IgnoredChannelIDs []string
}

type NotificationsIgnoredChannelsEntry

type NotificationsIgnoredChannelsEntry struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	GuildID   string
	ChannelID string
}

type NuguGameEntry

type NuguGameEntry struct {
	ID                  bson.ObjectId `bson:"_id,omitempty"`
	UserID              string        // person who start the game
	GuildID             string
	CorrectIdols        []bson.ObjectId
	CorrectIdolsCount   int // allows better performance for simple queries
	IncorrectIdols      []bson.ObjectId
	IncorrectIdolsCount int    // allows better performance for simple queries
	Gender              string // girl, boy, mixed
	GameType            string // idol, group
	IsMultigame         bool
	Difficulty          string
	UsersCorrectGuesses map[string][]bson.ObjectId // userid => []ids of idols they got right.  used in multi only
}

type NukelogEntry

type NukelogEntry struct {
	ID       bson.ObjectId `bson:"_id,omitempty"`
	UserID   string
	UserName string
	NukerID  string
	NukedAt  time.Time
}

type OldBiasGameEntry

type OldBiasGameEntry struct {
	ID           bson.ObjectId `bson:"_id,omitempty"`
	UserID       string
	GuildID      string
	GameWinner   OldIdolEntry
	RoundWinners []OldIdolEntry
	RoundLosers  []OldIdolEntry
	Gender       string // girl, boy, mixed
	GameType     string // single, multi
}

type OldIdolEntry

type OldIdolEntry struct {
	ID         bson.ObjectId `bson:"_id,omitempty"`
	Name       string
	GroupName  string
	Gender     string
	ObjectName string // name of file in object storage
	DriveID    string // this is strictly used for the drive migration. will be used to make sure files migrated before are not remigrated
}

type PersistencyRolesEntry

type PersistencyRolesEntry struct {
	ID      bson.ObjectId `bson:"_id,omitempty"`
	GuildID string
	UserID  string
	Roles   []string
}

type ProfileBackgroundEntry

type ProfileBackgroundEntry struct {
	ID         bson.ObjectId `bson:"_id,omitempty"`
	Name       string
	URL        string // deprecated
	ObjectName string
	CreatedAt  time.Time
	Tags       []string
}

type ProfileBadgeEntry

type ProfileBadgeEntry struct {
	ID               bson.ObjectId `bson:"_id,omitempty"`
	OldID            string        // deprecated
	CreatedByUserID  string
	Name             string
	Category         string
	BorderColor      string
	GuildID          string
	CreatedAt        time.Time
	URL              string // deprecated
	ObjectName       string
	LevelRequirement int
	RoleRequirement  string
	AllowedUserIDs   []string
	DeniedUserIDs    []string
}

func (ProfileBadgeEntry) GetID

func (e ProfileBadgeEntry) GetID() (ID string)

type ProfileUserdataEntry

type ProfileUserdataEntry struct {
	ID                   bson.ObjectId `bson:"_id,omitempty"`
	UserID               string
	Background           string
	BackgroundObjectName string
	Title                string
	Bio                  string
	Rep                  int
	LastRepped           time.Time
	ActiveBadgeIDs       []string
	BackgroundColor      string
	AccentColor          string
	TextColor            string
	BackgroundOpacity    string
	DetailOpacity        string
	BadgeOpacity         string
	EXPOpacity           string
	AvatarOpacity        string
	Timezone             string
	Birthday             string
	HideLastFm           bool
}

type RandompictureSourceEntry

type RandompictureSourceEntry struct {
	ID                 bson.ObjectId `bson:"_id,omitempty"`
	PreviousID         string
	GuildID            string
	PostToChannelIDs   []string
	DriveFolderIDs     []string
	Aliases            []string
	BlacklistedRoleIDs []string
}

type ReactionpollsEntry

type ReactionpollsEntry struct {
	ID              bson.ObjectId `bson:"_id,omitempty"`
	Text            string
	MessageID       string
	ChannelID       string
	GuildID         string
	CreatedByUserID string
	CreatedAt       time.Time
	Active          bool
	AllowedEmotes   []string
	MaxAllowedVotes int
	Reactions       map[string][]string // [emoji][]userIDs
	Initialised     bool
}

type RedditSubredditEntry

type RedditSubredditEntry struct {
	ID              bson.ObjectId `bson:"_id,omitempty"`
	SubredditName   string
	LastChecked     time.Time
	GuildID         string
	ChannelID       string
	AddedByUserID   string
	AddedAt         time.Time
	PostDelay       int
	PostDirectLinks bool
}

type RemindersEntry

type RemindersEntry struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	UserID    string
	Reminders []RemindersReminderEntry
}

type RemindersReminderEntry

type RemindersReminderEntry struct {
	Message   string
	ChannelID string
	GuildID   string
	Timestamp int64
}

type Rest_Background

type Rest_Background struct {
	Name string
	URL  string
	Tags []string
}

type Rest_Channel

type Rest_Channel struct {
	ID       string
	GuildID  string
	Name     string
	ParentID string
	Type     string
	Topic    string
	Position int
}

type Rest_Chatlog_Message

type Rest_Chatlog_Message struct {
	CreatedAt      time.Time
	ID             string
	Content        []string
	Attachments    []string
	AuthorID       string
	AuthorUsername string
	Embeds         int
	Deleted        bool
}

type Rest_Emoji

type Rest_Emoji struct {
	ID            string
	GuildID       string
	Name          string
	Managed       bool
	RequireColons bool
	Animated      bool
	APIName       string
}

type Rest_Eventlog

type Rest_Eventlog struct {
	Channels []Rest_Channel
	Users    []Rest_User
	Roles    []Rest_Role
	Entries  []Rest_Eventlog_Entry
	Emoji    []Rest_Emoji
	Guilds   []Rest_Guild
}

type Rest_Eventlog_Entry

type Rest_Eventlog_Entry struct {
	CreatedAt      time.Time
	TargetID       string
	TargetType     string
	UserID         string
	ActionType     string
	Reason         string
	Changes        []ElasticEventlogChange
	Options        []ElasticEventlogOption
	WaitingForData bool
}

type Rest_Feature_Chatlog

type Rest_Feature_Chatlog struct {
	Enabled bool
}

type Rest_Feature_Eventlog

type Rest_Feature_Eventlog struct {
	Enabled bool
}

type Rest_Feature_Levels_Badges

type Rest_Feature_Levels_Badges struct {
	Count int
}

type Rest_Feature_Module

type Rest_Feature_Module struct {
	Name string
	ID   ModulePermissionsModule
}

type Rest_Feature_RandomPictures

type Rest_Feature_RandomPictures struct {
	Count int
}

type Rest_Feature_ServerStatistics_Uniques

type Rest_Feature_ServerStatistics_Uniques struct {
	Enabled bool
}

type Rest_Feature_VanityInvite

type Rest_Feature_VanityInvite struct {
	VanityInviteName string
}

type Rest_File

type Rest_File struct {
	FileType string
	FileName string
	Data     string // as base64
}

type Rest_Guild

type Rest_Guild struct {
	ID        string
	Name      string
	Icon      string
	OwnerID   string
	JoinedAt  time.Time
	BotPrefix string
	Features  Rest_Guild_Features
	Settings  Rest_Settings
	Channels  []Rest_Channel
}

type Rest_Guild_Features

type Rest_Guild_Features struct {
	Levels_Badges            Rest_Feature_Levels_Badges
	RandomPictures           Rest_Feature_RandomPictures
	Chatlog                  Rest_Feature_Chatlog
	VanityInvite             Rest_Feature_VanityInvite
	Modules                  []Rest_Feature_Module
	Eventlog                 Rest_Feature_Eventlog
	ServerStatistics_Uniques Rest_Feature_ServerStatistics_Uniques
}

type Rest_Is_Member

type Rest_Is_Member struct {
	IsMember bool
}

type Rest_Member

type Rest_Member struct {
	GuildID  string
	JoinedAt time.Time
	Nick     string
	Roles    []string
}

type Rest_Member_Guild

type Rest_Member_Guild struct {
	ID        string
	Name      string
	Icon      string
	OwnerID   string
	JoinedAt  time.Time
	BotPrefix string
	Features  Rest_Guild_Features
	Channels  []Rest_Channel
	Settings  Rest_Settings
	Status    Rest_Status_Member
}

type Rest_RandomPictures_HistoryItem

type Rest_RandomPictures_HistoryItem struct {
	Link      string
	SourceID  string
	PictureID string
	Filename  string
	GuildID   string
	Time      time.Time
}

type Rest_Ranking

type Rest_Ranking struct {
	Ranks []Rest_Ranking_Rank_Item
	Count int
}

type Rest_Ranking_Rank_Item

type Rest_Ranking_Rank_Item struct {
	User                Rest_User
	GuildID             string
	IsMember            bool
	EXP                 int64
	Level               int
	Ranking             int
	NextLevelTotalEXP   int64
	NextLevelCurrentEXP int64
	Progress            int
}

type Rest_Receive_SetSettings

type Rest_Receive_SetSettings struct {
	Strings []struct {
		Key    string
		Values []string
	}
}

type Rest_Role

type Rest_Role struct {
	ID          string
	GuildID     string
	Name        string
	Managed     bool
	Mentionable bool
	Hoist       bool
	Color       string
	Position    int
	Permissions int
}

type Rest_Setting_String

type Rest_Setting_String struct {
	Key    string
	Level  SettingLevel
	Values []string
}

type Rest_Settings

type Rest_Settings struct {
	Strings []Rest_Setting_String
}

type Rest_Statistics_Count

type Rest_Statistics_Count struct {
	Count int64
}

type Rest_Statistics_Histogram

type Rest_Statistics_Histogram struct {
	Time  string // ISO 8601
	Count int64
}

type Rest_Statistics_Histogram_Three

type Rest_Statistics_Histogram_Three struct {
	Time   string // ISO 8601
	Count1 int64
	Count2 int64
	Count3 int64
	Count4 int64
}

type Rest_Statistics_Histogram_Two

type Rest_Statistics_Histogram_Two struct {
	Time   string // ISO 8601
	Count1 int64
	Count2 int64
}

type Rest_Statistics_Histogram_TwoSub

type Rest_Statistics_Histogram_TwoSub struct {
	Time     string // ISO 8601
	Count1   int64
	Count2   int64
	SubItems []Rest_Statistics_Histogram_TwoSub_SubItem
}

type Rest_Statistics_Histogram_TwoSub_SubItem

type Rest_Statistics_Histogram_TwoSub_SubItem struct {
	Key   string
	Value int64
}

type Rest_Statitics_Bot

type Rest_Statitics_Bot struct {
	Users  int
	Guilds int
}

type Rest_Status_Member

type Rest_Status_Member struct {
	IsMember                        bool
	IsBotAdmin                      bool
	IsNukeMod                       bool
	IsRobyulStaff                   bool
	IsBlacklisted                   bool
	IsGuildAdmin                    bool
	IsGuildMod                      bool
	HasGuildPermissionAdministrator bool
}

type Rest_User

type Rest_User struct {
	ID            string
	Username      string
	AvatarHash    string
	Discriminator string
	Bot           bool
}

type Rest_VanityInvite_Invite

type Rest_VanityInvite_Invite struct {
	Code    string
	GuildID string
}

type SettingLevel

type SettingLevel string

type StarboardEntry

type StarboardEntry struct {
	ID                        bson.ObjectId `bson:"_id,omitempty"`
	GuildID                   string
	MessageID                 string
	ChannelID                 string
	AuthorID                  string
	MessageContent            string
	MessageAttachmentURLs     []string
	MessageEmbedImageURL      string
	StarboardMessageID        string
	StarboardMessageChannelID string
	StarUserIDs               []string
	Stars                     int
	FirstStarred              time.Time
}

type StorageEntry

type StorageEntry struct {
	ID             bson.ObjectId `bson:"_id,omitempty"`
	ObjectName     string
	ObjectNameHash string
	UploadDate     time.Time
	Filename       string
	UserID         string
	GuildID        string
	ChannelID      string
	Source         string
	MimeType       string
	Filesize       int // in bytes
	Public         bool
	Metadata       map[string]string
	RetrievedCount int
}

type TwitchEntry

type TwitchEntry struct {
	ID                bson.ObjectId `bson:"_id,omitempty"`
	GuildID           string        // renamed from serverid
	ChannelID         string
	TwitchChannelName string
	TwitchUserID      string
	IsLive            bool
	MentionRoleID     string
}

type TwitterEntry

type TwitterEntry struct {
	ID                bson.ObjectId `bson:"_id,omitempty"`
	GuildID           string
	ChannelID         string
	AccountScreenName string
	AccountID         string
	PostedTweets      []TwitterTweetEntry
	MentionRoleID     string
	PostMode          TwitterPostMode
	ExcludeRTs        bool
	ExcludeMentions   bool
}

type TwitterPostMode

type TwitterPostMode int

type TwitterTweetEntry

type TwitterTweetEntry struct {
	ID        string
	CreatedAt string
}

type UserConfigEntry

type UserConfigEntry struct {
	ID          bson.ObjectId `bson:"_id,omitempty"`
	UserID      string
	Key         string
	Value       []byte
	LastChanged time.Time
}

type UseruploadsDisabledUsersEntry

type UseruploadsDisabledUsersEntry struct {
	ID             bson.ObjectId `bson:"_id,omitempty"`
	UserID         string
	BannedByUserID string
	BannedAt       time.Time
}

type VanityInviteEntry

type VanityInviteEntry struct {
	ID               bson.ObjectId `bson:"_id,omitempty"`
	GuildID          string
	ChannelID        string
	VanityName       string
	VanityNamePretty string
	SetByUserID      string
	SetAt            time.Time
}

type VanityInviteRedisEntry

type VanityInviteRedisEntry struct {
	InviteCode string
	ExpiresAt  time.Time
}

type VliveCelebInfo

type VliveCelebInfo struct {
	ID      string `json:"post_id"`
	Summary string `json:"body_summary"`
	Url     string `json:"-"`
}

type VliveChannelInfo

type VliveChannelInfo struct {
	Seq           int64  `json:"channel_seq"`
	Code          string `json:"channel_code"`
	Type          string `json:"type"`
	Name          string `json:"channel_name"`
	Followers     int64  `json:"fan_count"`
	CoverImgUrl   string `json:"channel_cover_img"`
	ProfileImgUrl string `json:"channel_profile_img"`
	Color         string `json:"representative_color"`
	TotalVideos   int64  `json:"-"`
	CelebBoard    struct {
		BoardID int64 `json:"board_id"`
	} `json:"celeb_board"`
	Upcoming []VliveVideoInfo  `json:"-"`
	Live     []VliveVideoInfo  `json:"-"`
	VOD      []VliveVideoInfo  `json:"-"`
	Notices  []VliveNoticeInfo `json:"-"`
	Celebs   []VliveCelebInfo  `json:"-"`
	Url      string            `json:"-"`
}

type VliveEntry

type VliveEntry struct {
	ID             bson.ObjectId `bson:"_id,omitempty"`
	GuildID        string        // renamed from server ID
	ChannelID      string
	VLiveChannel   VliveChannelInfo
	PostedUpcoming []VliveVideoInfo
	PostedLive     []VliveVideoInfo
	PostedVOD      []VliveVideoInfo
	PostedNotices  []VliveNoticeInfo
	PostedCelebs   []VliveCelebInfo
	MentionRoleID  string
}

type VliveNoticeInfo

type VliveNoticeInfo struct {
	Number   int64  `json:"noticeNo"`
	Title    string `json:"title"`
	ImageUrl string `json:"listImageUrl"`
	Summary  string `json:"summary"`
	Url      string `json:"-"`
}

type VliveVideoInfo

type VliveVideoInfo struct {
	Seq       int64  `json:"videoSeq"`
	Title     string `json:"title"`
	Plays     int64  `json:"playCount"`
	Likes     int64  `json:"likeCount"`
	Comments  int64  `json:"commentCount"`
	Thumbnail string `json:"thumbnail"`
	Date      string `json:"onAirStartAt"`
	Playtime  int64  `json:"playTime"`
	Type      string `json:"videoType"`
	Url       string `json:"-"`
}

type WeatherLastLocationEntry

type WeatherLastLocationEntry struct {
	ID     bson.ObjectId `bson:"_id,omitempty"`
	UserID string
	Lat    float64
	Lng    float64
	Text   string
}

type Website_Session_Data

type Website_Session_Data struct {
	DiscordUserID string
}

type YoutubeChannelEntry

type YoutubeChannelEntry struct {
	// Discord related fields.
	ID                      bson.ObjectId `bson:"_id,omitempty"`
	GuildID                 string        // renamed from ServerID
	ChannelID               string
	NextCheckTime           int64
	LastSuccessfulCheckTime int64

	// Youtube channel specific fields.
	YoutubeChannelID    string
	YoutubePostedVideos []string
}

type YoutubeQuota

type YoutubeQuota struct {
	Daily     int64
	Left      int64
	ResetTime int64
}

Jump to

Keyboard shortcuts

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