# Nightbot

> Read Nightbot chat settings and manage custom commands, timers and regulars.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/nightbot

## Actions

### Create custom command

Create custom command.

**Inputs**

- Name (`name`, text, required): Name people type in chat, such as !schedule.
- Message (`message`, text, required): Message that Nightbot sends to chat.
- Cooldown (`cooldown`, number, required): Seconds between uses of the command. From 5 to 300.
- User level (`user_level`, text, required): Minimum role that can use the command. One of: `everyone`, `subscriber`, `regular`, `twitch_vip` (Twitch vip), `soop_vip` (Soop vip), `moderator`, `owner`, `admin`.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "command": {
      "_id": "example",
      "coolDown": 1,
      "count": 1,
      "message": "example",
      "name": "example",
      "updatedAt": "example",
      "userLevel": "example"
    },
    "status": 1
  }
}
```

### Delete custom command

Delete custom command.

**Inputs**

- Command (`command_id`, text, required): Custom command in your channel.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "status": 1
  }
}
```

### Get channel regular

Get channel regular.

**Inputs**

- Regular (`regular_id`, text, required): Channel regular from your channel.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "regular": {
      "_id": "example",
      "createdAt": "example",
      "displayName": "example",
      "name": "example",
      "provider": "example",
      "providerId": "example"
    },
    "status": 1
  }
}
```

### Get channel subscriber

Get channel subscriber.

**Inputs**

- Subscriber (`subscriber_id`, text, required): Channel subscriber from your channel.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "status": 1,
    "subscriber": {
      "_id": "example",
      "createdAt": "example",
      "displayName": "example",
      "name": "example",
      "provider": "example",
      "providerId": "example"
    }
  }
}
```

### Get chat timer

Get chat timer.

**Inputs**

- Timer (`timer_id`, text, required): Chat timer from your channel.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "status": 1,
    "timer": {
      "_id": "example",
      "enabled": true,
      "interval": "example",
      "lines": 1,
      "message": "example",
      "name": "example",
      "nextRunAt": "example",
      "updatedAt": "example"
    }
  }
}
```

### Get custom command

Get custom command.

**Inputs**

- Command (`command_id`, text, required): Custom command from your channel.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "command": {
      "_id": "example",
      "coolDown": 1,
      "count": 1,
      "message": "example",
      "name": "example",
      "updatedAt": "example",
      "userLevel": "example"
    },
    "status": 1
  }
}
```

### Get default Nightbot command

Get default Nightbot command.

**Inputs**

- Command name (`command_name`, text, required): Name of a built-in Nightbot command.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "command": {
      "enabled": true,
      "name": "example"
    },
    "status": 1
  }
}
```

### Get song request settings

Get song request settings.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "settings": {},
    "status": 1
  }
}
```

### Get spam protection filter

Get spam protection filter.

**Inputs**

- Filter type (`filter_type`, text, required): Nightbot spam filter to look up. One of: `blacklist`, `caps`, `emotes`, `links`, `repetitions`, `symbols`.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "filter": {},
    "status": 1
  }
}
```

### Get your Nightbot channel

Get your Nightbot channel.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "channel": {
      "_id": "example",
      "displayName": "example",
      "joined": true,
      "name": "example",
      "plan": "example"
    },
    "status": 1
  }
}
```

### Get your Nightbot profile

Get your Nightbot profile.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "status": 1,
    "user": {
      "_id": "example",
      "createdAt": "example",
      "displayName": "example",
      "name": "example",
      "provider": "example",
      "providerId": "example"
    }
  }
}
```

### List channel regulars

List channel regulars.

**Inputs**

- Limit (`limit`, number): Maximum number of people to return. From 1 to 100.
- Offset (`offset`, number): Number of people to skip. At least 0.
- Search (`search`, text): Name to search for.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "_total": 1,
    "regulars": [
      {
        "_id": "example",
        "createdAt": "example",
        "displayName": "example",
        "name": "example",
        "provider": "example",
        "providerId": "example"
      }
    ],
    "status": 1
  }
}
```

### List channel subscribers

List channel subscribers.

**Inputs**

- Limit (`limit`, number): Maximum number of people to return. From 1 to 100.
- Offset (`offset`, number): Number of people to skip. At least 0.
- Search (`search`, text): Name to search for.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "_total": 1,
    "status": 1,
    "subscribers": [
      {
        "_id": "example",
        "createdAt": "example",
        "displayName": "example",
        "name": "example",
        "provider": "example",
        "providerId": "example"
      }
    ]
  }
}
```

### List chat timers

List chat timers.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "_total": 1,
    "status": 1,
    "timers": [
      {
        "_id": "example",
        "enabled": true,
        "interval": "example",
        "lines": 1,
        "message": "example",
        "name": "example",
        "nextRunAt": "example",
        "updatedAt": "example"
      }
    ]
  }
}
```

### List custom commands

List custom commands.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "_total": 1,
    "commands": [
      {
        "_id": "example",
        "coolDown": 1,
        "count": 1,
        "message": "example",
        "name": "example",
        "updatedAt": "example",
        "userLevel": "example"
      }
    ],
    "status": 1
  }
}
```

### List default Nightbot commands

List default Nightbot commands.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "commands": [
      {
        "enabled": true,
        "name": "example"
      }
    ],
    "status": 1
  }
}
```

### List Nightbot playlist songs

List Nightbot playlist songs.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "_total": 1,
    "playlist": [
      {
        "_id": "example",
        "createdAt": "example",
        "title": "example"
      }
    ],
    "status": 1
  }
}
```

### List queued song requests

List queued song requests.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "_total": 1,
    "queue": [
      {
        "_id": "example",
        "createdAt": "example",
        "title": "example"
      }
    ],
    "status": 1
  }
}
```

### List spam protection filters

List spam protection filters.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "filters": [
      {}
    ],
    "status": 1
  }
}
```

### Update custom command

Update custom command.

**Inputs**

- Command (`command_id`, text, required): Custom command in your channel.
- Name (`name`, text): Name people type in chat, such as !schedule.
- Message (`message`, text): Message that Nightbot sends to chat.
- Cooldown (`cooldown`, number): Seconds between uses of the command. From 5 to 300.
- User level (`user_level`, text): Minimum role that can use the command. One of: `everyone`, `subscriber`, `regular`, `twitch_vip` (Twitch vip), `soop_vip` (Soop vip), `moderator`, `owner`, `admin`.

**Outputs**

- `data` (object): The response from Nightbot.

**Example output**

```json
{
  "data": {
    "command": {
      "_id": "example",
      "coolDown": 1,
      "count": 1,
      "message": "example",
      "name": "example",
      "updatedAt": "example",
      "userLevel": "example"
    },
    "status": 1
  }
}
```
