fetcher

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const API_BASE = "/api/v9"
View Source
const DOMAIN = "discord.com"

Variables

View Source
var Err404 = errors.New("404")
View Source
var ErrBadAuth = errors.New("error 401: unauthorized! this means the token is bad")
View Source
var ErrMsgNotFound = errors.New("msg not found")

Functions

func DownloadMedia

func DownloadMedia(mediaDir string, urlToFetch string, name string)

Types

type ConfigType

type ConfigType config.Config

func (ConfigType) FetchMain

func (conf ConfigType) FetchMain()

func (ConfigType) FetchMsgId

func (conf ConfigType) FetchMsgId(channel string, id string) (discord.Message, error)

func (ConfigType) GetCookie

func (conf ConfigType) GetCookie()

type JSONMetaAttachment

type JSONMetaAttachment struct {
	discord.Attachment
	AuthorID string
}

type JSONMetaData

type JSONMetaData struct {
	MsgList         []discord.Message    `json:"messages"`
	MsgIDToIndex    map[string]int       `json:"msgIdToIndex"`
	MsgByAuthor     map[string][]string  `json:"msgByAuthor"`
	AttachList      []JSONMetaAttachment `json:"attachments"`
	AttachIDToIndex map[string]int       `json:"attachmentIdToIndex"`
	AttachByAuthor  map[string][]string  `json:"attachmentByAuthor"`
}

type NewDMChannelResp

type NewDMChannelResp struct {
	Id string `json:"id"`
}

type RateLimit

type RateLimit struct {
	RetryAfter float64 `json:"retry_after"`
}

Jump to

Keyboard shortcuts

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