> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-telegram/troubleshooting.md).

# Troubleshooting

Fix common CAS Telegram issues — the device not opening, a blank panel, a framework not detected, a wrong RSG money type, voice recording and resets.

## The device does not open

Check your console for a script error. If there is none, check that `oxmysql` started before this resource:

```cfg
ensure oxmysql
ensure cas-telegram
```

## The panel opens but is blank

`web/dist/` is missing from the resource folder. That folder is the device itself and must ship with it.

If you built the interface yourself, run the build again:

```bash
cd web
npm run build
```

## The console says a setting is wrong

The line names the setting and the resource does not open. Fix that value in `config.lua` and restart. For example:

```
[telegram] config: Config.MarketFee is 1.5; it must be between 0 and 0.99.
```

## It says standalone but I run VORP or RSG

The resource waits up to a minute for your framework to answer, so a slightly wrong order in `server.cfg` is not the cause. Seeing `standalone` means the framework never started.

Check that `vorp_core` or `rsg-core` is running, then either fix the order:

```cfg
ensure oxmysql
ensure rsg-core
ensure cas-telegram
```

or name it by hand:

```lua
Config.Framework = 'rsg'   -- 'auto' | 'vorp' | 'rsg' | 'standalone'
```

## The console names my money type and refuses to open

`Config.RSGMoneyType` is not an account your rsg-core has. The message lists the ones it does:

```
[telegram] config: Config.RSGMoneyType is "kasa", which rsg-core does not
have. This server knows: bank, bloodmoney, cash, valbank.
```

Set it to one of those and restart.

## A player says nobody can wire them

That is their own privacy setting, not a fault. By default a player can only be wired by someone already in their address book.

Tell them to open the device and set **Settings**, **Privacy**, **Who may wire me** to **Anyone**.

The other player can also simply be saved in their book first, which has the same effect.

## Prices come out of the wrong wallet

Your currency is not set. See [Currency](/script-documentation/cas-telegram/configuration.md#currency).

## Voice recording does nothing

The device tells the player which of three things happened.

| Message                        | What to do                                                   |
| ------------------------------ | ------------------------------------------------------------ |
| The microphone was refused     | Allow microphone access for RedM in Windows privacy settings |
| No microphone was found        | Plug one in, or pick one in Windows sound settings           |
| This build cannot record audio | Set `Config.VoiceCapture = false`                            |

Press record and speak. If the bars move with your voice, the microphone is working.

## Voice messages have no waveform

Only recordings made after the feature was added carry one. Older ones fall back to a plain pattern. Nothing is broken.

## The town crier only reached some players

A player with **Quiet hours** set to **Always quiet** is not disturbed on purpose. The notice is still on the board for them.

A player who is not holding a number does not hear it either.

## A player cannot send from where they are

`Config.OfficeMode` is set to `send` or `always`. The message names the nearest telegraph office. See [Telegraph offices](/script-documentation/cas-telegram/telegraph-offices.md).

## Someone is flooding the exchange

They are not. The limits in `Config.RateLimits` stop it before anything is written. If a normal player is being caught by them, raise the `count` for that action. See [Flood protection](/script-documentation/cas-telegram/configuration.md#flood-protection).

## A burner number vanished

That is what a burner does. It is struck off after `hours` in `Config.DiscreetLines`, and its messages go with it. It is also struck off when the player disconnects, unless they turned that off in their settings.

## Something looks switched off that should be on

Set `Config.Debug = true`, restart, and open the address book. The console prints what the database actually returned. Send that line to support.

Turn it back off when you are done.

## Resetting everything

This deletes every number, conversation, voice message, listing, and notice. There is no undo.

```sql
DROP TABLE telegram_criers;
DROP TABLE telegram_voice;
DROP TABLE telegram_listings;
DROP TABLE telegram_messages;
DROP TABLE telegram_wire_members;
DROP TABLE telegram_wires;
DROP TABLE telegram_contacts;
DROP TABLE telegram_accounts;
```

Restart the resource. The tables are rebuilt empty.

## Resetting one player

Find their numbers:

```sql
SELECT id, number, name FROM telegram_accounts WHERE owner = 'THEIR_ID';
```

`owner` is the character identifier, which is the VORP character id or the RSG citizen id.

Deleting a row from `telegram_accounts` leaves that number free to be issued again.
