Documentation ¶
Index ¶
- func ArgSplit(str string) (result []string)
- func DecodeGifWithCompleteFrame(r io.Reader) (g *gif.GIF, err error)
- func DeserializationElement(r string) ([]message.IMessageElement, error)
- func DeserializationGroupMsg(r string) (*message.GroupMessage, error)
- func FilePathWalkDir(root string) ([]string, error)
- func FriendLogFields(uin int64) logrus.Fields
- func FuncName() string
- func GetGifDimensions(gif *gif.GIF) (x, y int)
- func GroupLogFields(groupCode int64) logrus.Fields
- func ImageFormat(origImage []byte) (string, error)
- func ImageGet(url string, opt ...requests.Option) ([]byte, error)
- func ImageGetWithoutCache(url string, opt ...requests.Option) ([]byte, error)
- func ImageNormSize(origImage []byte) ([]byte, error)
- func ImageReserve(imgBytes []byte) ([]byte, error)
- func ImageResize(origImage []byte, width, height uint) ([]byte, error)
- func ImageSuffix(name string) bool
- func JoinInt64(ele []int64, sep string) string
- func MergeImages(images [][]byte) ([]byte, error)
- func MessageFilter(msg []message.IMessageElement, filter func(message.IMessageElement) bool) []message.IMessageElement
- func PrefixMatch(opts []string, prefix string) (string, bool)
- func RemoveHtmlTag(s string) string
- func Retry(count int, interval time.Duration, f func() bool) bool
- func SerializationElement(e []message.IMessageElement) (string, error)
- func SerializationGroupMsg(m *message.GroupMessage) (string, error)
- func SubImage(img image.Image, r image.Rectangle) image.Image
- func Switch2Bool(s string) bool
- func TimestampFormat(ts int64) string
- func ToDatas(data interface{}) (map[string]string, error)
- func ToParams(data interface{}) (gout.H, error)
- func UnquoteString(s string) (string, error)
- func UploadGroupImage(groupCode int64, img []byte, isNorm bool) (image *message.GroupImageElement, err error)
- func UploadGroupImageByUrl(groupCode int64, url string, isNorm bool) (*message.GroupImageElement, error)
- func UploadPrivateImage(uin int64, img []byte, isNorm bool) (*message.FriendImageElement, error)
- func UrlEncode(data map[string]string) string
- type EmitE
- type EmitQueue
- type HackedBot
- func (h *HackedBot) FindFriend(uin int64) *client.FriendInfo
- func (h *HackedBot) FindGroup(code int64) *client.GroupInfo
- func (h *HackedBot) GetFriendList() []*client.FriendInfo
- func (h *HackedBot) GetGroupList() []*client.GroupInfo
- func (h *HackedBot) GetUin() int64
- func (h *HackedBot) IsOnline() bool
- func (h *HackedBot) SolveFriendRequest(req *client.NewFriendRequest, accept bool)
- func (h *HackedBot) SolveGroupJoinRequest(i interface{}, accept, block bool, reason string)
- func (h *HackedBot) TESTAddGroup(groupCode int64)
- func (h *HackedBot) TESTAddMember(groupCode int64, uin int64, permission client.MemberPermission)
- func (h *HackedBot) TESTReset()
- func (h *HackedBot) TESTSetUin(uin int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializationElement ¶
func DeserializationElement(r string) ([]message.IMessageElement, error)
DeserializationElement 反序列化消息,只支持图片,文字
func DeserializationGroupMsg ¶
func DeserializationGroupMsg(r string) (*message.GroupMessage, error)
func FilePathWalkDir ¶
func FriendLogFields ¶
func GetGifDimensions ¶
func GroupLogFields ¶
func ImageFormat ¶
func ImageGetWithoutCache ¶
ImageGetWithoutCache 默认情况下相同的url会存在缓存, 如果url会随机返回不同的图片,则需要禁用缓存 这个函数就是不使用缓存的版本
func ImageNormSize ¶
func ImageReserve ¶
func ImageSuffix ¶
func MergeImages ¶
func MessageFilter ¶
func MessageFilter(msg []message.IMessageElement, filter func(message.IMessageElement) bool) []message.IMessageElement
func PrefixMatch ¶
PrefixMatch 从 opts 中选择一个前缀是 prefix 的字符串,如果有多个选项,则返回 false
func RemoveHtmlTag ¶
func SerializationElement ¶
func SerializationElement(e []message.IMessageElement) (string, error)
SerializationElement 序列化消息,只支持图片,文字
func SerializationGroupMsg ¶
func SerializationGroupMsg(m *message.GroupMessage) (string, error)
func Switch2Bool ¶
func TimestampFormat ¶
func UnquoteString ¶
func UploadGroupImage ¶
func UploadGroupImageByUrl ¶
func UploadPrivateImage ¶
Types ¶
type EmitE ¶
type EmitE struct { Id interface{} Type concern_type.Type }
func NewEmitE ¶
func NewEmitE(id interface{}, t concern_type.Type) *EmitE
type HackedBot ¶
HackedBot 拦截一些方法方便测试
func (*HackedBot) FindFriend ¶
func (h *HackedBot) FindFriend(uin int64) *client.FriendInfo
func (*HackedBot) GetFriendList ¶
func (h *HackedBot) GetFriendList() []*client.FriendInfo
func (*HackedBot) GetGroupList ¶
func (*HackedBot) SolveFriendRequest ¶
func (h *HackedBot) SolveFriendRequest(req *client.NewFriendRequest, accept bool)
func (*HackedBot) SolveGroupJoinRequest ¶
func (*HackedBot) TESTAddGroup ¶
TESTAddGroup 仅可用于测试
func (*HackedBot) TESTAddMember ¶
func (h *HackedBot) TESTAddMember(groupCode int64, uin int64, permission client.MemberPermission)
TESTAddMember 仅可用于测试
Source Files ¶
Click to show internal directories.
Click to hide internal directories.