> For the complete documentation index, see [llms.txt](https://assurancetourix.gitbook.io/assurancetourix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://assurancetourix.gitbook.io/assurancetourix/customc/dshell/discord-keywords.md).

# Discord keywords

### <mark style="color:yellow;">embed</mark>

Create an embed to use in Discord.

{% hint style="warning" %}
Require a variable after the keyword `embed` !
{% endhint %}

```
embed my_embed
--title "Embed title"
--description "Embed description"
--color [255, 255, 255]           :: can be an integer or a list of integers
--type "rich"
--url "https://wikipedia.org"
--image "image url"
--thumbnail "thumbnail image url"
#embed

sm --embeds my_embed              :: send one embed
sm --embeds [my_embed, my_embed]  :: send more than one embed
```

### <mark style="color:yellow;">#embed</mark> (end of embed block)

Keyword <mark style="color:$danger;">REQUIRED</mark> to make a valide embed bloc

```
embed my_embed
...
#embed           :: REQUIRED !!
```

### <mark style="color:yellow;">field</mark>

Add field to the current embed. Must be used in an embed block !

```
embed my_embed
...
field --name "my first field" --value "whatever..." --inline true
field --name "my second field" --value "I don't know what write..." --inline false
...
#embed

sm --embeds my_embed

```

<figure><img src="/files/wo7wVIjLsWJ5migguPLL" alt=""><figcaption><p>Just owner and autorised administrators can execute command natively</p></figcaption></figure>

<figure><img src="/files/FNZT4Mc95n8SGFXQIpnj" alt=""><figcaption></figcaption></figure>

***

### <mark style="color:yellow;">perm/permission</mark>

Create permissions to integrate in roles or channels.

perm keyword <mark style="color:$danger;">required</mark> an ident to store permission data.

{% hint style="info" %}
To calculate permissions, see [here](https://discordapi.com/permissions.html) !

Permissions is an integer !
{% endhint %}

**Create permissions to a channel :**&#x20;

```
perm member_perm

--members [123456789, 985623147, 554123698]   :: add permissions to a list of members
--allow 64         :: add reactions
--deny 32768       :: attach files

#perm

perm role_perm

--roles [5487512563, 9988545552]              :: add permissions to a list of roles
--allow 32832      :: both permissions : add reactions and attach files

#perms
```

To merge two permissions data, you cand use the + operator :&#x20;

```
perm member_perm
...
#perm

perm role_perm
..
#perm

var both_perms member_perm + role_perm       :: permissions combined in both_perms
```

{% hint style="info" %}
Parameter after `--members` or `--roles` must be a list/single ID
{% endhint %}

**Create permissions to a role :**&#x20;

```
perm my_perm_role

--allow 2
--deny 64

#perm
```

{% hint style="info" %}
Role permissions do not require `--members` or `--/~~roles` because it's unique.
{% endhint %}

### <mark style="color:yellow;">#perm/#permission</mark>

Keyword <mark style="color:$danger;">REQUIRED</mark> to make a valide permission bloc

```
perm my_perm

...

#perm     :: required !
```

### <mark style="color:yellow;">ui</mark>

Create an UI for Discord.

{% hint style="warning" %}
Require a variable after the keyword `ui` !
{% endhint %}

```
ui my_ui

button --label "click me" --disabled false --emoji "🗿"

#ui
```

### <mark style="color:yellow;">#ui</mark>

Keyword <mark style="color:$danger;">REQUIRED</mark> to make a valide ui bloc

```
ui my_ui

...

#ui    :: required !!!!
```

### button

Create a button for an UI

<table><thead><tr><th align="center">Parameters</th><th align="center">Description</th><th data-type="checkbox">Required</th><th data-type="content-ref">Data type to pass</th></tr></thead><tbody><tr><td align="center">label</td><td align="center">The button label</td><td>true</td><td><a href="/pages/czxrnHOzg4OVID6Bq8Hs#str-string">/pages/czxrnHOzg4OVID6Bq8Hs#str-string</a></td></tr><tr><td align="center">style</td><td align="center"><p>The button style : <br><mark style="color:$info;">primary</mark></p><p><mark style="color:$info;">secondary</mark></p><p><mark style="color:green;">success</mark></p><p><mark style="color:red;">danger</mark></p><p><mark style="color:$info;">link</mark></p><p><mark style="color:$info;">premium</mark></p></td><td>false</td><td><a href="/pages/czxrnHOzg4OVID6Bq8Hs#str-string">/pages/czxrnHOzg4OVID6Bq8Hs#str-string</a></td></tr><tr><td align="center">emoji</td><td align="center">The emoji to insert before the label</td><td>false</td><td><a href="/pages/czxrnHOzg4OVID6Bq8Hs#str-string">/pages/czxrnHOzg4OVID6Bq8Hs#str-string</a></td></tr><tr><td align="center">disabled</td><td align="center">If the button is diabled or not</td><td>false</td><td><a href="/pages/czxrnHOzg4OVID6Bq8Hs#bool-boolean">/pages/czxrnHOzg4OVID6Bq8Hs#bool-boolean</a></td></tr><tr><td align="center">url</td><td align="center">The url to link at the button.<br>Work if the style is "<mark style="color:$info;">link</mark>"</td><td>false</td><td><a href="/pages/czxrnHOzg4OVID6Bq8Hs#str-string">/pages/czxrnHOzg4OVID6Bq8Hs#str-string</a></td></tr><tr><td align="center">row</td><td align="center">The line position of the button (not the column).<br>To modify the column, changes the order in which buttons are written in the block </td><td>false</td><td><a href="/pages/czxrnHOzg4OVID6Bq8Hs#int-interger">/pages/czxrnHOzg4OVID6Bq8Hs#int-interger</a></td></tr><tr><td align="center">code</td><td align="center">The code executed when the button is pressed.<br>The execution context is loaded with the current user who as interact with the button.</td><td>false</td><td><a href="/pages/ycXTWa2LDsz0nwrksUkm#code-code-block">/pages/ycXTWa2LDsz0nwrksUkm#code-code-block</a></td></tr></tbody></table>


---

# 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, and the optional `goal` query parameter:

```
GET https://assurancetourix.gitbook.io/assurancetourix/customc/dshell/discord-keywords.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
