bot

package
v0.0.0-...-b0fc717 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditStateFactory

func EditStateFactory(jstr []byte, sbp persist.StateBasePersistent) gogram.State

func EditStateFactoryWithData

func EditStateFactoryWithData(jstr []byte, sbp persist.StateBasePersistent, data esp) gogram.State

func PostStateFactory

func PostStateFactory(jstr []byte, sbp persist.StateBasePersistent) gogram.State

func PostStateFactoryWithData

func PostStateFactoryWithData(jstr []byte, sbp persist.StateBasePersistent, data psp) gogram.State

func ShowHelp

func ShowHelp(topic string) string

Types

type AutofixState

type AutofixState struct {
	gogram.StateBase

	Behavior *botbehavior.Behavior
}

func (*AutofixState) DoMaintenance

func (this *AutofixState) DoMaintenance(bot *gogram.TelegramBot)

func (*AutofixState) GetInterval

func (this *AutofixState) GetInterval() int64

func (*AutofixState) Handle

func (this *AutofixState) Handle(ctx *gogram.MessageCtx)

func (*AutofixState) HandleCallback

func (this *AutofixState) HandleCallback(ctx *gogram.CallbackCtx)

func (*AutofixState) HandleCallbackTx

func (this *AutofixState) HandleCallbackTx(tx storage.DBLike, ctx *gogram.CallbackCtx) error

type EditState

type EditState struct {
	persist.StateBasePersistent
	// contains filtered or unexported fields
}

func (*EditState) Cancel

func (this *EditState) Cancel(ctx *gogram.MessageCtx)

func (*EditState) Edit

func (this *EditState) Edit(ctx *gogram.MessageCtx)

func (*EditState) Freeform

func (this *EditState) Freeform(ctx *gogram.MessageCtx)

func (*EditState) Handle

func (this *EditState) Handle(ctx *gogram.MessageCtx)

func (*EditState) HandleCallback

func (this *EditState) HandleCallback(ctx *gogram.CallbackCtx)

func (*EditState) HandleCallbackTx

func (this *EditState) HandleCallbackTx(tx storage.DBLike, ctx *gogram.CallbackCtx) error

type HelpState

type HelpState struct {
	gogram.StateBase
}

func (*HelpState) Handle

func (this *HelpState) Handle(ctx *gogram.MessageCtx)

type JanitorState

type JanitorState struct {
	gogram.StateBase
}

func (*JanitorState) Handle

func (this *JanitorState) Handle(ctx *gogram.MessageCtx)

type LoginState

type LoginState struct {
	gogram.StateBase
	// contains filtered or unexported fields
}

func (*LoginState) Handle

func (this *LoginState) Handle(ctx *gogram.MessageCtx)

func (*LoginState) HandleTx

func (this *LoginState) HandleTx(tx storage.DBLike, ctx *gogram.MessageCtx) error

type OperatorState

type OperatorState struct {
	gogram.StateBase

	Behavior *botbehavior.Behavior
}

func (*OperatorState) Handle

func (this *OperatorState) Handle(ctx *gogram.MessageCtx)

type PostFile

type PostFile struct {
	// contains filtered or unexported fields
}

type PostState

type PostState struct {
	persist.StateBasePersistent
	// contains filtered or unexported fields
}

func (*PostState) Cancel

func (this *PostState) Cancel(ctx *gogram.MessageCtx)

func (*PostState) Freeform

func (this *PostState) Freeform(ctx *gogram.MessageCtx)

func (*PostState) Handle

func (this *PostState) Handle(ctx *gogram.MessageCtx)

func (*PostState) HandleCallback

func (this *PostState) HandleCallback(ctx *gogram.CallbackCtx)

func (*PostState) HandleCallbackTx

func (this *PostState) HandleCallbackTx(tx storage.DBLike, ctx *gogram.CallbackCtx) error

func (*PostState) Post

func (this *PostState) Post(ctx *gogram.MessageCtx)

func (*PostState) WriteUserTagRules

func (this *PostState) WriteUserTagRules(tx storage.DBLike, my_id data.UserID, tagrules, name string) error

type TagRuleState

type TagRuleState struct {
	gogram.StateBase
	// contains filtered or unexported fields
}

func (*TagRuleState) Handle

func (this *TagRuleState) Handle(ctx *gogram.MessageCtx)

func (*TagRuleState) HandleTx

func (this *TagRuleState) HandleTx(tx storage.DBLike, ctx *gogram.MessageCtx) error

type VoteState

type VoteState struct {
	gogram.StateBase
	// contains filtered or unexported fields
}

func (*VoteState) DoMaintenance

func (this *VoteState) DoMaintenance(bot *gogram.TelegramBot)

func (*VoteState) GetInterval

func (this *VoteState) GetInterval() int64

func (*VoteState) Handle

func (this *VoteState) Handle(ctx *gogram.MessageCtx)

func (*VoteState) HandleCallback

func (this *VoteState) HandleCallback(ctx *gogram.CallbackCtx)

func (*VoteState) HandleCmd

func (this *VoteState) HandleCmd(from *data.TUser, cmd *gogram.CommandData, reply_message *data.TMessage, bot *gogram.TelegramBot) (data.OMessage, bool)

func (*VoteState) MarkAndTestRecentlyFaved

func (this *VoteState) MarkAndTestRecentlyFaved(tg_user data.UserID, post_id int) bool

func (*VoteState) MarkAndTestRecentlyVoted

func (this *VoteState) MarkAndTestRecentlyVoted(tg_user data.UserID, vote apitypes.PostVote, post_id int) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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