Documentation
¶
Index ¶
- Variables
- func GetReason(s string) (string, error)
- func ParseRoll(s string) (int64, int64, int64, bool)
- func SendMessage(method string, params map[string]string, c config.Config) ([]byte, error)
- func SplitRollWithAdder(s string) (int64, int64, int64)
- func SplitRollWithSubtr(s string) (int64, int64, int64)
- type CreateResult
- type ErrorResult
- type HelpResult
- type Maloi
- type PResult
- type PercentResult
- type ReqType
- type Resulter
- type RollBot
- func (app *RollBot) CreateCharacteristics() ([]characteristic, error)
- func (app *RollBot) CreateCommand(vk VKReq) (Resulter, error)
- func (rb *RollBot) FindUser(userId int) (string, error)
- func (rb *RollBot) GetCharacter(w http.ResponseWriter, req *http.Request)
- func (rb *RollBot) GetHistory(w http.ResponseWriter, req *http.Request)
- func (rb *RollBot) GetUserHistory(w http.ResponseWriter, req *http.Request)
- func (rb *RollBot) GetUsers(w http.ResponseWriter, req *http.Request)
- func (app *RollBot) HelpCommand(vk VKReq) (Resulter, error)
- func (rb *RollBot) Homepage(w http.ResponseWriter, req *http.Request)
- func (app *RollBot) ParseCommand(vkr *VKReq) (func(VKReq) (Resulter, error), error)
- func (app *RollBot) PercentCommand(vk VKReq) (Resulter, error)
- func (app *RollBot) RollCommand(vk VKReq) (Resulter, error)
- func (app *RollBot) RollMaloi(vk VKReq) (Resulter, error)
- func (rb RollBot) SendResult(vkr *VKReq, text string) error
- func (rb *RollBot) VKHandle(w http.ResponseWriter, req *http.Request)
- type RollResult
- type UserResponse
- type VKReq
Constants ¶
This section is empty.
Variables ¶
View Source
var ReqTypeText = map[ReqType]string{ Confirm: "confirmation", MessageTyping: "message_typing_state", MessageNew: "message_new", }
Functions ¶
func SendMessage ¶
Types ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func (*CreateResult) Comment ¶
func (h *CreateResult) Comment() string
func (*CreateResult) HTML ¶
func (h *CreateResult) HTML() string
func (*CreateResult) VKString ¶
func (h *CreateResult) VKString() string
type ErrorResult ¶
type ErrorResult struct {
// contains filtered or unexported fields
}
func NewErrorResult ¶
func NewErrorResult(err error) *ErrorResult
func (*ErrorResult) Comment ¶
func (h *ErrorResult) Comment() string
func (*ErrorResult) HTML ¶
func (h *ErrorResult) HTML() string
func (*ErrorResult) VKString ¶
func (h *ErrorResult) VKString() string
type HelpResult ¶
type HelpResult struct {
// contains filtered or unexported fields
}
func (*HelpResult) Comment ¶
func (h *HelpResult) Comment() string
func (*HelpResult) HTML ¶
func (h *HelpResult) HTML() string
func (*HelpResult) VKString ¶
func (h *HelpResult) VKString() string
type PercentResult ¶
type PercentResult struct {
// contains filtered or unexported fields
}
func (*PercentResult) Comment ¶
func (h *PercentResult) Comment() string
func (*PercentResult) HTML ¶
func (h *PercentResult) HTML() string
func (*PercentResult) VKString ¶
func (h *PercentResult) VKString() string
type RollBot ¶
func (*RollBot) CreateCharacteristics ¶
func (*RollBot) GetCharacter ¶
func (rb *RollBot) GetCharacter(w http.ResponseWriter, req *http.Request)
func (*RollBot) GetHistory ¶
func (rb *RollBot) GetHistory(w http.ResponseWriter, req *http.Request)
func (*RollBot) GetUserHistory ¶
func (rb *RollBot) GetUserHistory(w http.ResponseWriter, req *http.Request)
func (*RollBot) ParseCommand ¶
type RollResult ¶
type RollResult struct {
// contains filtered or unexported fields
}
func (*RollResult) Comment ¶
func (r *RollResult) Comment() string
func (*RollResult) HTML ¶
func (r *RollResult) HTML() string
func (*RollResult) VKString ¶
func (r *RollResult) VKString() string
type UserResponse ¶
type VKReq ¶
type VKReq struct { Type ReqType `json:"type"` Object struct { Message struct { Date int `json:"date"` FromID int `json:"from_id"` ID int `json:"id"` Out int `json:"out"` PeerID int `json:"peer_id"` Text string `json:"text"` ConversationMessageID int `json:"conversation_message_id"` FwdMessages []interface{} `json:"fwd_messages"` Important bool `json:"important"` RandomID int `json:"random_id"` Attachments []interface{} `json:"attachments"` IsHidden bool `json:"is_hidden"` } `json:"message"` ClientInfo struct { ButtonActions []string `json:"button_actions"` Keyboard bool `json:"keyboard"` InlineKeyboard bool `json:"inline_keyboard"` Carousel bool `json:"carousel"` LangID int `json:"lang_id"` } `json:"client_info"` } `json:"object"` GroupID int `json:"group_id"` EventID string `json:"event_id"` Secret string `json:"secret"` }
func (*VKReq) RemoveQuotesAndCheckIsCommand ¶
Click to show internal directories.
Click to hide internal directories.