From 24478b6320d03efce331af17d5b9bb7ac2658b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 14 Sep 2021 17:13:37 +0300 Subject: [PATCH] Update saveRadios function --- src/client/funcs/saveRadios.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/funcs/saveRadios.js b/src/client/funcs/saveRadios.js index af84efa..53c5947 100644 --- a/src/client/funcs/saveRadios.js +++ b/src/client/funcs/saveRadios.js @@ -4,9 +4,10 @@ module.exports = function saveRadios(client) { while (!radio.done) { let currentRadio = client.radio.get(radio.value); - currentRadio.guild = client.datastore.getEntry(radio.value).guild; if (currentRadio) { + currentRadio.guild = client.datastore.getEntry(radio.value).guild; + client.funcs.statisticsUpdate(client, currentRadio.guild, currentRadio); client.funcs.saveState(client, currentRadio.guild, currentRadio); currentRadio.connection?.destroy();