Documentation ¶
Index ¶
- type Event
- type EventHandler
- type EventHandlerCallback
- type EventInterface
- type SatoriChannelEvent
- type SatoriEvent
- type SatoriEventImpl
- type SatoriGuildEvent
- type SatoriGuildMemberEvent
- type SatoriGuildRoleEvent
- type SatoriLoginEvent
- type SatoriMessageEvent
- type SatoriReactionEvent
- type SatoriUserEvent
- type SignInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Id int64 `json:"id"` //事件 ID Type string `json:"type"` //事件类型 Platform string `json:"platform"` //接收者的平台名称 SelfId string `json:"self_id"` //接收者的平台账号 Timestamp int64 `json:"timestamp"` //事件的时间戳 Channel *channel.Channel `json:"channel,omitempty"` //事件所属的频道 Guild *guild.Guild `json:"guild,omitempty"` //事件所属的群组 Login *login.Login `json:"login,omitempty"` //事件的登录信息 Member *guildmember.GuildMember `json:"member,omitempty"` //事件的目标成员 Message *message.Message `json:"message,omitempty"` //事件的消息 Operator *user.User `json:"operator,omitempty"` //事件的操作者 Role *guildrole.GuildRole `json:"role,omitempty"` //事件的目标角色 User *user.User `json:"user,omitempty"` //事件的目标用户 }
type EventHandler ¶
type EventHandler struct { EventType string EventHandler EventHandlerCallback }
type EventHandlerCallback ¶
type EventInterface ¶
type EventInterface interface {
// contains filtered or unexported methods
}
type SatoriChannelEvent ¶
type SatoriChannelEvent interface { EventInterface }
func NewSatoriChannelEvent ¶
func NewSatoriChannelEvent() (SatoriChannelEvent, error)
type SatoriEvent ¶
type SatoriEvent interface { SatoriChannelEvent SatoriGuildEvent SatoriGuildMemberEvent SatoriGuildRoleEvent SatoriLoginEvent SatoriMessageEvent SatoriUserEvent StartWithCtx(ctx context.Context) error }
func NewSatorEventByConfig ¶
func NewSatorEventByConfig(conf config.SatoriConfig) (SatoriEvent, error)
type SatoriEventImpl ¶
type SatoriEventImpl struct { SatoriChannelEvent SatoriGuildEvent SatoriGuildMemberEvent SatoriGuildRoleEvent SatoriLoginEvent SatoriMessageEvent SatoriUserEvent // contains filtered or unexported fields }
func (*SatoriEventImpl) StartWithCtx ¶
func (s *SatoriEventImpl) StartWithCtx(ctx context.Context) error
type SatoriGuildEvent ¶
type SatoriGuildEvent interface { EventInterface ListenGuildAdded(callback EventHandlerCallback) ListenGuildUpdated(callback EventHandlerCallback) ListenGuildRemoved(callback EventHandlerCallback) ListenGuildRequest(callback EventHandlerCallback) }
func NewSatoriGuildEvent ¶
func NewSatoriGuildEvent() (SatoriGuildEvent, error)
type SatoriGuildMemberEvent ¶
type SatoriGuildMemberEvent interface { EventInterface ListenGuildMemberAdded(callback EventHandlerCallback) ListenGuildMemberUpdated(callback EventHandlerCallback) ListenGuildMemberRemoved(callback EventHandlerCallback) ListenGuildMemberRequest(callback EventHandlerCallback) }
func NewSatoriGuildMemberEvent ¶
func NewSatoriGuildMemberEvent() (SatoriGuildMemberEvent, error)
type SatoriGuildRoleEvent ¶
type SatoriGuildRoleEvent interface { EventInterface ListenGuildRoleCreated(callback EventHandlerCallback) ListenGuildRoleUpdated(callback EventHandlerCallback) ListenGuildRoleDeleted(callback EventHandlerCallback) }
func NewSatoriGuildRoleEvent ¶
func NewSatoriGuildRoleEvent() (SatoriGuildRoleEvent, error)
type SatoriLoginEvent ¶
type SatoriLoginEvent interface { EventInterface ListenLoginAdded(callback EventHandlerCallback) ListenLoginUpdated(callback EventHandlerCallback) ListenLoginRemoved(callback EventHandlerCallback) }
func NewSatoriLoginEvent ¶
func NewSatoriLoginEvent() (SatoriLoginEvent, error)
type SatoriMessageEvent ¶
type SatoriMessageEvent interface { EventInterface ListenMessageCreated(callback EventHandlerCallback) ListenMessageUpdated(callback EventHandlerCallback) ListenMessageDelete(callback EventHandlerCallback) }
func NewSatoriMessageEvent ¶
func NewSatoriMessageEvent() (SatoriMessageEvent, error)
type SatoriReactionEvent ¶
type SatoriReactionEvent interface { EventInterface ListenReactionAdded(callback EventHandlerCallback) ListenReactionRemoved(callback EventHandlerCallback) }
func NewSatoriReactionEvent ¶
func NewSatoriReactionEvent() (SatoriReactionEvent, error)
type SatoriUserEvent ¶
type SatoriUserEvent interface { EventInterface ListenFriendRequest(callback EventHandlerCallback) }
func NewSatoriUserEvent ¶
func NewSatoriUserEvent() (SatoriUserEvent, error)
Click to show internal directories.
Click to hide internal directories.