# 类: GroupMessageEvent

[(返回目录)](/api.md)

**继承自:** [MessageEvent](/api/messageevent.md)

RainyBot的群组消息事件类，其实例记录了与一次群组消息事件相关的数据

## 方法

* static [GroupMessageEvent](/api/groupmessageevent.md) **init\_meta (** [Dictionary](https://docs.godotengine.org/en/latest/classes/class_dictionary.html) dic **)**

通过机器人协议后端的元数据字典构造一个此类的实例，仅当你知道自己在做什么时才使用

***

* [GroupMember](/api/groupmember.md) **get\_sender ( )**

获取消息事件对应的发送者的群组成员实例

***

* [Group](/api/group.md) **get\_group ( )**

获取消息事件所对应的群组的实例

***

* [int](https://docs.godotengine.org/en/latest/classes/class_int.html) **get\_group\_id ( )**

获取消息事件所对应的群组的ID

***

* [BotRequestResult](/api/botrequestresult.md) **recall (** [float](https://docs.godotengine.org/en/latest/classes/class_float.html) timeout=-INF **)**

撤回事件所对应的群消息，机器人需要在对应群组中为管理员或群组权限才能执行成功

配合await关键字可返回一个BotRequestResult类的实例，便于判断执行状态

可以通过指定timeout参数来自定义获取请求结果的超时时间，若不指定则默认将使用配置文件中设置的超时时间

***

* [BotRequestResult](/api/botrequestresult.md) **set\_essence (** [float](https://docs.godotengine.org/en/latest/classes/class_float.html) timeout=-INF **)**

将事件所对应的群消息设置为精华消息，机器人需要在对应群组中为管理员或群组权限才能执行成功

配合await关键字可返回一个BotRequestResult类的实例，便于判断执行状态

可以通过指定timeout参数来自定义获取请求结果的超时时间，若不指定则默认将使用配置文件中设置的超时时间

***

* [bool](https://docs.godotengine.org/en/latest/classes/class_bool.html) **is\_at\_bot ( )**

判断事件所对应的群消息中是否AT了机器人

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rainybot.dev/api/groupmessageevent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
