# bot.issetAttr() и bot.isAttrExist()

### Проверить наличие переменной бота

```JavaScript
bot.issetAttr(string $key)
```

или

```JavaScript
bot.isAttrExist(string $key)
```

##### Описание:

Проверяет существует ли глобальная переменная в боте.

##### Атрибуты:

<table border="1" id="bkmrk-%D0%98%D0%BC%D1%8F-%D0%A2%D0%B8%D0%BF-%D0%9E%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D0%B5-key-1" style="border-collapse: collapse; width: 100%; height: 89.3907px;"><tbody><tr style="background-color: #ced4d9; height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">Имя</td><td style="width: 33.3745%; height: 29.7969px;">Тип</td><td style="width: 33.3745%; height: 29.7969px;">Описание</td></tr><tr style="height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">key</td><td style="width: 33.3745%; height: 29.7969px;">string</td><td style="width: 33.3745%; height: 29.7969px;">Наименование переменной</td></tr></tbody></table>

<span style="font-size: 1.4em; font-weight: 400;">Возвращает:</span>

**bool** - подтверждение существования переменной.

##### Пример:

Проверка двумя способами существования глобальной переменной бота bot\_attribute:

```JavaScript
let bot_exists = bot.issetAttr('bot_attribute');
let bot_altexists = bot.isAttrExist('bot_attribute');
```