# Vending Machine Name

#### Description

This event is triggered when a vending machine name is updated

#### Parameters

```typescript
{ server: IServer, player: IPlayer, oldName: string, newName: string }
```

#### Example

{% tabs %}
{% tab title="TypeScript" %}

```javascript
import { RCEEvent, type IVendingMachineNameEventPayload } from "rce.js";

// ...

rce.on(RCEEvent.VendingMachineName, (payload: IVendingMachineNameEventPayload) => {
    console.log(`${payload.player.ign} has updated vending machine name from "${payload.oldName}" to "${payload.newName}" in ${payload.server.identifier}`);
});
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const { RCEEvent } = require("rce.js");

// ...

rce.on(RCEEvent.VendingMachineName, (payload) => {
    console.log(`${payload.player.ign} has updated vending machine name from "${payload.oldName}" to "${payload.newName}" in ${payload.server.identifier}`);
});
```

{% endtab %}
{% endtabs %}
