-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac1e016
commit fce3357
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* | ||
*/ | ||
package org.ots123it.JMirai; | ||
|
||
import net.mamoe.mirai.message.FriendMessageEvent; | ||
import net.mamoe.mirai.message.GroupMessageEvent; | ||
import net.mamoe.mirai.message.data.Message; | ||
|
||
/** | ||
* JMsg接口。<br> | ||
* <br> | ||
* 该接口定义了Mirai支持的所有事件处理方法。<br> | ||
* 若继承{@link MiraiAppAbstract}则必须实现本接口。 | ||
* @since 0.0.1 | ||
* @version 0.0.1 | ||
* @see MiraiAppAbstract | ||
* @author 御坂12456 | ||
* | ||
*/ | ||
public interface JMsg{ | ||
|
||
/** | ||
* 事件01:群消息事件<br> | ||
* 该方法会在mirai-console【主线程】中被调用。 | ||
* | ||
* @param Mirai {@link Mirai}对象 | ||
* @param rawEvent 消息原事件对象 | ||
* @param rawMsg 消息原对象 | ||
* @param sendTime 消息时间戳 | ||
* @param groupId 消息来源群号 | ||
* @param groupName 消息来源群名 | ||
* @param qqId 消息来源QQ号 | ||
* @param qqName 消息来源QQ昵称(若存在群名片则使用群名片昵称) | ||
* @param msg 消息内容 | ||
*/ | ||
public void groupMsg(Mirai Mirai, GroupMessageEvent rawEvent, Message rawMsg, long sendTime, long groupId, | ||
String groupName, long qqId, String qqName, String msg); | ||
|
||
/** | ||
* 事件02:私聊(好友)消息事件<br> | ||
* 该方法会在mirai-console【主线程】中被调用。 | ||
* | ||
* @param Mirai {@link Mirai}对象 | ||
* @param rawEvent 消息原事件对象 | ||
* @param rawMsg 消息原对象 | ||
* @param sendTime 消息时间戳 | ||
* @param qqId 消息来源QQ号 | ||
* @param qqName 消息来源QQ昵称 | ||
* @param msg 消息内容 | ||
*/ | ||
public void privateMsg(Mirai Mirai, FriendMessageEvent rawEvent, Message rawMsg, long sendTime, long qqId, | ||
String qqName, String msg); | ||
|
||
} | ||
|