# Interface: CommitmentInterface (/jsdoc/nqtr/index/interfaces/CommitmentInterface)



Defined in: [src/interface/activity/CommitmentInterface.ts:5](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/CommitmentInterface.ts#L5)

## Extends [#extends]

* `CommitmentBaseInternalInterface`

## Properties [#properties]

### characters [#characters]

\> `readonly` **characters**: `CharacterInterface`\[]

Defined in: [src/interface/activity/CommitmentInterface.ts:11](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/CommitmentInterface.ts#L11)

The character or characters that are in the commitment and so in the room.

#### Inherited from [#inherited-from]

`CommitmentBaseInternalInterface.characters`

***

### dateScheduling? [#datescheduling]

\> `readonly` `optional` &#x2A;*dateScheduling?**: [`DateSchedulingInterface`](/jsdoc/nqtr/index/interfaces/DateSchedulingInterface)

Defined in: [src/interface/activity/ActiveScheduling.ts:12](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/ActiveScheduling.ts#L12)

Used to schedule what date it will be added and removed.

#### Inherited from [#inherited-from-1]

`CommitmentBaseInternalInterface.dateScheduling`

***

### executionType [#executiontype]

\> **executionType**: [`ExecutionType`](/jsdoc/nqtr/index/type-aliases/ExecutionType)

Defined in: [src/interface/activity/CommitmentInterface.ts:16](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/CommitmentInterface.ts#L16)

Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.

#### Inherited from [#inherited-from-2]

`CommitmentBaseInternalInterface.executionType`

***

### expired [#expired]

\> `readonly` **expired**: `boolean`

Defined in: [src/interface/activity/ActivityInterface.ts:19](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/ActivityInterface.ts#L19)

Whether the activity/commitment is a deadline, so it will then be removed or hidden.

It **depends only on the date**, not the time. So if you set \{ dateScheduling: \{ from: 0, to: 3 }, timeSlot \{ from: 10, to: 20 } } the activity/commitment hidden or deleted on date 3 at 0.

#### Inherited from [#inherited-from-3]

`CommitmentBaseInternalInterface.expired`

***

### id [#id]

\> `readonly` **id**: `string`

Defined in: [src/interface/activity/ActivityInterface.ts:9](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/ActivityInterface.ts#L9)

The id of the activity/commitment.

#### Inherited from [#inherited-from-4]

`CommitmentBaseInternalInterface.id`

***

### priority [#priority]

\> **priority**: `number`

Defined in: [src/interface/activity/CommitmentInterface.ts:21](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/CommitmentInterface.ts#L21)

The priority. The higher the number, the higher the priority.
To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.

#### Inherited from [#inherited-from-5]

`CommitmentBaseInternalInterface.priority`

***

### run [#run]

\> `readonly` **run**: [`OnRunAsyncFunction`](/jsdoc/nqtr/index/type-aliases/OnRunAsyncFunction)

Defined in: [src/interface/activity/ActivityInterface.ts:13](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/ActivityInterface.ts#L13)

The function that is called when the activity/commitment is runned.

#### Inherited from [#inherited-from-6]

`CommitmentBaseInternalInterface.run`

***

### timeSlot? [#timeslot]

\> `readonly` `optional` &#x2A;*timeSlot?**: [`TimeSchedulingInterface`](/jsdoc/nqtr/index/interfaces/TimeSchedulingInterface) | [`TimeSchedulingInterface`](/jsdoc/nqtr/index/interfaces/TimeSchedulingInterface)\[]

Defined in: [src/interface/activity/ActiveScheduling.ts:8](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/ActiveScheduling.ts#L8)

Time slot in which activity/commitment will be active.

#### Inherited from [#inherited-from-7]

`CommitmentBaseInternalInterface.timeSlot`

## Methods [#methods]

### isActive() [#isactive]

\> **isActive**(`options?`): `boolean`

Defined in: [src/interface/activity/ActivityInterface.ts:24](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/activity/ActivityInterface.ts#L24)

Whether the activity/commitment is active, so it will be shown in the routine and can be runned.

#### Parameters [#parameters]

##### options? [#options]

[`ActiveScheduling`](/jsdoc/nqtr/index/interfaces/ActiveScheduling)

The options to check if the activity/commitment is active.

#### Returns [#returns]

`boolean`

#### Inherited from [#inherited-from-8]

`CommitmentBaseInternalInterface.isActive`
