> For the complete documentation index, see [llms.txt](https://docs.nm1scripts.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nm1scripts.in/classy-series/advanced-classy-notification/intergrations/qbcore.md).

# qbcore

qb-core/client/functions.lua

{% code title="qb-core/client/nm1notify.lua" overflow="wrap" lineNumbers="true" fullWidth="false" expandable="true" %}

```lua
function QBCore.Functions.Notify(text, texttype, length, icon)

    local typeMap = {
        primary = 'info',
        error = 'error',
        success = 'success',
        warning = 'warning',
        info = 'info',
    }

    local message, title

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

    local success = pcall(function()
        exports['nm1-classynotify']:Notify({
            type = typeMap[texttype] or 'info',
            message = message,
            title = title,
            duration = length or 5000,
            icon = icon or nil,
            position = 'top-right'
        })
    end)

    if not success then
        print('^1[nm1-classynotify]^7 Failed to send notification. Is the resource started?')
    end
end
```

{% endcode %}
