> For the complete documentation index, see [llms.txt](https://ak-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ak-scripts.gitbook.io/docs/yi-lai/markdown/ti-huan-kuang-jia-mo-ren-zhi/qbx/tong-zhi-notify.md).

# 通知（Notify）

## ⚙️ 如何更改 QBX 的默认通知

> 本节将教你如何将 `QBX` **默认通知** 替换为 `ak-lib` **通知**。
>
> 由于 `QBX` 不同版本在函数结构上略有差异，本次示例基于 `QBX` `1.23.0` 进行讲解。

### 🧭 步骤一：导航到函数文件

前往以下路径：

```
qbx_core/client/functions.lua
```

在文件中搜索以下函数（约在第12行）：

```lua
function Notify
```

***

### 🧩 步骤二：替换 QBX 默认通知函数

```lua
function Notify(text, notifyType, subTitle, notifyIcon, notifyIconColor)
    local title, description

    if type(text) == 'table' then
        title = text.text or 'Placeholder'
        description = text.caption or nil
    elseif subTitle then
        title = text
        description = subTitle
    else
        description = text
    end

    exports['ak-lib']:Notify({
        title    = title,
        message  = description,
        type     = notifyType or "info",
        icon     = notifyIcon,
        iconColor = notifyIconColor
    })
end
```

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ak-scripts.gitbook.io/docs/yi-lai/markdown/ti-huan-kuang-jia-mo-ren-zhi/qbx/tong-zhi-notify.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.
