ares

package
v0.0.0-...-d20008b Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ares

type Ares struct {
	SlackAppToken string
	SlackBotToken string
	SlackAppID    string
	ImgurClientID string
	BotUserID     string
	// Bot won't be added or re-added to these channels
	ManagedChannels []string
	// list of userIDs of admins
	Admins []string
	// list of userIDs of moderators
	Moderators []string
	// maintain a user dict
	Users map[string]string
	// Muted users list
	MutedUsers map[string]bool
}

func (*Ares) ClearImages

func (a *Ares) ClearImages()

Removes all the existing images by going through each user list and re-uploads them to Imgur TODO: a lot of code duplicated

func (*Ares) Run

func (a *Ares) Run()

type ImgurResponse

type ImgurResponse struct {
	Data struct {
		Deletehash string `json:"deletehash"`
		Link       string `json:"link"`
	} `json:"data"`
	Success bool `json:"success"`
	Status  int  `json:"status"`
}

type UploadResponse

type UploadResponse struct {
	Link       string
	DeleteLink string
	Status     bool
}

type VgyResponse

type VgyResponse struct {
	Error    bool   `json:"error"`
	URL      string `json:"url"`
	Image    string `json:"image"`
	Size     int    `json:"size"`
	Filename string `json:"filename"`
	Ext      string `json:"ext"`
	Delete   string `json:"delete"`
}

Jump to

Keyboard shortcuts

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