Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Nov 19, 2024
1 parent a2bd4e7 commit 2cc7e59
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,59 @@ package cn.rtast.rob.qqbot.qbot

import cn.rtast.rob.qqbot.entity.inbound.*

/**
* 所有事件的监听器, 继承此类重写需要的事件接口
* 就能获取到对应事件的实体类
*/
interface QQBotListener {

/**
* 群聊消息
*/
suspend fun onGroupMessage(message: GroupAtMessageCreateEvent) {}

/**
* 单聊消息
*/
suspend fun onC2CMessage(message: C2CMessageCreateEvent) {}

/**
* 被添加好友
*/
suspend fun onFriendAdd(event: FriendAddEvent) {}

/**
* 被删除好友
*/
suspend fun onFriendDelete(event: FriendDelEvent) {}

/**
* 被群聊移除
*/
suspend fun onGroupDeleteRobot(event: GroupDeleteRobotEvent) {}

/**
* 被群聊添加
*/
suspend fun onGroupAddRobot(event: GroupAddRobotEvent) {}

/**
* 拒绝机器人主动消息
*/
suspend fun onC2CMessageRejectEvent(event: C2CMessageRejectEvent) {}

/**
* 允许机器人主动消息
*/
suspend fun onC2CMessageReceiveEvent(event: C2CMessageReceiveEvent) {}

/**
* 群聊拒绝机器人主动消息
*/
suspend fun onGroupMessageRejectEvent(event: GroupMessageRejectEvent) {}

/**
* 群聊接受机器人主动消息
*/
suspend fun onGroupMessageReceiveEvent(event: GroupMessageReceiveEvent) {}
}

0 comments on commit 2cc7e59

Please sign in to comment.