> For the complete documentation index, see [llms.txt](https://hrscripts.gitbook.io/hrscripts-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hrscripts.gitbook.io/hrscripts-documentation/resources/hrlib/modules/discordmsg/server.md).

# Server

## DiscordMsg

Function to send a message into a discord server via discord webhook

```lua
function HRLib.DiscordMsg(
    webHook: string?,
    botName: string,
    title: string?,
    message: string,
    type: string?,
    color: number?,
    icon: string?,
    author: string?
)
```

Parameters description

* `webHook` - the URL of the discord webhook, used to send the message (nil will  be replaced with the default webhook in HRLib's config)
* `botName` - the webhook name when sending message (it is different each time)
* `title` - the title of the message
* `message` - the message content
* `type` - the message type (usually not used, default: 'rich')
* `color` - the message box's color
* `icon` - a direct URL link to an image for logo maybe
* `author` - text, under the message
