backupmodels

package
v0.0.0-...-553821e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID                   string                           `json:"id"`
	Name                 string                           `json:"name"`
	Topic                string                           `json:"topic"`
	Type                 discordgo.ChannelType            `json:"type"`
	NSFW                 bool                             `json:"nsfw"`
	Position             int                              `json:"position"`
	Bitrate              int                              `json:"bitrate"`
	UserLimit            int                              `json:"user_limit"`
	ParentID             string                           `json:"parent_id"`
	PermissionOverwrites []*discordgo.PermissionOverwrite `json:"permission_overwrites"`
}

Channel contains general properties of the channel.

type Entry

type Entry struct {
	GuildID   string    `json:"guild_id"`
	Timestamp time.Time `json:"timestamp"`
	FileID    string    `json:"file_id"`
}

Entry wraps the database entry of a backup.

func (Entry) String

func (t Entry) String() string

func (Entry) StringIndexed

func (t Entry) StringIndexed(i int) string

func (Entry) TimestampFormatted

func (t Entry) TimestampFormatted() string

type Guild

type Guild struct {
	Name                        string `json:"name"`
	AfkChannelID                string `json:"afk_channel_id"`
	AfkTimeout                  int    `json:"afk_timeout"`
	VerificationLevel           int    `json:"verification_level"`
	DefaultMessageNotifications int    `json:"default_message_notifications"`
}

Guild contains general properties of the guild.

type Member

type Member struct {
	ID    string   `json:"id"`
	Nick  string   `json:"nick"`
	Deaf  bool     `json:"deaf"`
	Mute  bool     `json:"mute"`
	Roles []string `json:"roles"`
}

Member contains general properties of the member.

type Object

type Object struct {
	ID        string     `json:"id"`
	Timestamp time.Time  `json:"timestamp"`
	Guild     *Guild     `json:"guild"`
	Channels  []*Channel `json:"channels"`
	Roles     []*Role    `json:"roles"`
	Members   []*Member  `json:"members"`
}

Object wraps a backup structure with an unique ID (snowflake), timestamp of creation, the guild properties and each channels, roles and members properties.

type Role

type Role struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Mentionable bool   `json:"mentionable"`
	Hoist       bool   `json:"hoist"`
	Color       int    `json:"color"`
	Position    int    `json:"position"`
	Permissions int64  `json:"permissions"`
}

Role contains general properties of the role.

Jump to

Keyboard shortcuts

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