mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 01:53:17 +00:00
Added reload stations option in maintenance command
This commit is contained in:
parent
f9ce2bfaf9
commit
8316723a6a
@ -41,6 +41,12 @@ module.exports = {
|
|||||||
description: "",
|
description: "",
|
||||||
value: "6"
|
value: "6"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
emoji: "<:RadioXList:688541155519889482>",
|
||||||
|
label: "Reload Stations",
|
||||||
|
description: "",
|
||||||
|
value: "7"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
emoji: "<:dnd:746069698139127831>",
|
emoji: "<:dnd:746069698139127831>",
|
||||||
label: "Enable Maintenance Mode",
|
label: "Enable Maintenance Mode",
|
||||||
@ -108,6 +114,18 @@ module.exports = {
|
|||||||
require(`../commands.js`).execute(client);
|
require(`../commands.js`).execute(client);
|
||||||
client.user.setStatus('online');
|
client.user.setStatus('online');
|
||||||
break;
|
break;
|
||||||
|
case "7":
|
||||||
|
try {
|
||||||
|
client.funcs.logger('Stations', 'Started fetching list – ' + client.config.stationslistUrl);
|
||||||
|
client.stations = await fetch(client.config.stationslistUrl)
|
||||||
|
.then(client.funcs.checkFetchStatus)
|
||||||
|
.then(response => response.json());
|
||||||
|
|
||||||
|
client.funcs.logger('Stations', 'Successfully fetched list');
|
||||||
|
} catch (error) {
|
||||||
|
client.funcs.logger('Stations', 'Fetching list failed');
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "8":
|
case "8":
|
||||||
client.user.setStatus('dnd');
|
client.user.setStatus('dnd');
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user