discord

package
v0.108.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MPL-2.0, MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Channel

type Channel struct {
	ID           string `json:"id"`
	CategoryName string `json:"category"`
	CategoryID   string `json:"categoryId"`
	Name         string `json:"name"`
	Description  string `json:"topic"`
	FilePath     string `json:"filePath"`
}

type ErrorType

type ErrorType uint
const (
	NoError ErrorType = iota
	Warning
	Error
)

type ExportedData

type ExportedData struct {
	Channel  Channel                    `json:"channel"`
	Messages []*protobuf.DiscordMessage `json:"messages"`
}

type ExtractedData

type ExtractedData struct {
	Categories             map[string]*Category
	ExportedData           []*ExportedData
	OldestMessageTimestamp int
}

type ImportError

type ImportError struct {
	// This code is used to distinguish between errors
	// that are considered "criticial" and those that are not.
	//
	// Critical errors are the ones that prevent the imported community
	// from functioning properly. For example, if the creation of the community
	// or its categories and channels fails, this is a critical error.
	//
	// Non-critical errors are the ones that would not prevent the imported
	// community from functioning. For example, if the channel data to be imported
	// has no messages, or is not parsable.
	Code    ErrorType `json:"code"`
	Message string    `json:"message"`
}

func (ImportError) Error

func (d ImportError) Error() string

type MessageType

type MessageType string
const (
	MessageTypeDefault MessageType = "Default"
	MessageTypeReply   MessageType = "Reply"
)

Jump to

Keyboard shortcuts

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