> For the complete documentation index, see [llms.txt](https://docs.rainybot.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainybot.dev/api/facemessage.md).

# 类: FaceMessage

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

**继承自:** [Message](/api/message.md)

RainyBot的表情消息类，其实例记录了与一个表情消息相关的各类数据

## 方法

* static [FaceMessage](/api/facemessage.md) **init (** [Variant](https://docs.godotengine.org/en/latest/classes/class_variant.html) face **)**

用于手动构造一个表情消息实例；若传入的参数为整数，则基于表情ID进行构造；若为字符串，则基于表情名称进行构造

***

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

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

***

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

获取此实例对应的表情的ID

***

* void **set\_face\_id (** [int](https://docs.godotengine.org/en/latest/classes/class_int.html) face\_id **)**

设置此实例对应的表情的ID

***

* [String](https://docs.godotengine.org/en/latest/classes/class_string.html) **get\_face\_name ( )**

获取此实例对应的表情的名称

***

* void **set\_face\_name (** [String](https://docs.godotengine.org/en/latest/classes/class_string.html) face\_name **)**

设置此实例对应的表情的名称

***

* [String](https://docs.godotengine.org/en/latest/classes/class_string.html) **get\_as\_text ( )**

将此实例获取为字符串的形式

***
