tickets

package
v1.19.4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTicketMsg        = "{{$embed := cembed `description` (joinStr `` `Welcome ` .User.Mention `\n\nPlease describe the reasoning for opening this ticket, include any information you think may be relevant such as proof, other third parties and so on.` " + DefaultTicketMsgClose + DefaultTicketMsgAddUser + ")}}\n{{sendMessage nil $embed}}"
	DefaultTicketMsgClose   = "\n\"\\n\\nuse the following command to close the ticket\\n\"\n\"`-ticket close reason for closing here`\\n\\n\""
	DefaultTicketMsgAddUser = "\n\"use the following command to add users to the ticket\\n\"\n\"`-ticket adduser @user`\""
)
View Source
const DBSchema = `` /* 1441-byte string literal not displayed */
View Source
const TicketTXTDateFormat = "2006 Jan 02 15:04:05"

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin()

func RequireActiveTicketMW

func RequireActiveTicketMW(inner dcmd.RunFunc) dcmd.RunFunc

func TicketLog

func TicketLog(conf *models.TicketConfig, guildID int64, author *discordgo.User, embed *discordgo.MessageEmbed)

Types

type CtxKey

type CtxKey int
const (
	CtxKeyConfig        CtxKey = iota
	CtxKeyCurrentTicket CtxKey = iota
)

type FormData

type FormData struct {
	GuildID                   int64
	Enabled                   bool
	TicketsChannelCategory    int64
	TicketsTranscriptsChannel int64
	StatusChannel             int64
	TicketsUseTXTTranscripts  bool
	DownloadAttachments       bool
	ModRoles                  []int64 `valid:"role"`
	AdminRoles                []int64 `valid:"role"`
	TicketOpenMSG             string  `valid:"template,10000"`
}

type Plugin

type Plugin struct{}

func (*Plugin) AddCommands

func (p *Plugin) AddCommands()

func (*Plugin) InitWeb

func (p *Plugin) InitWeb()

func (*Plugin) LoadServerHomeWidget added in v1.18.0

func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() *common.PluginInfo

type Ticket

type Ticket struct {
	Ticket       *models.Ticket
	Participants []*models.TicketParticipant
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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