TypeScript types

This commit is contained in:
Christer Warén
2023-06-04 05:48:42 +03:00
parent 9303c4fcc9
commit 3fc7337d0f
36 changed files with 131 additions and 119 deletions

View File

@@ -4,8 +4,8 @@ export default {
name: 'list',
description: 'List radio stations',
category: 'radio',
execute(interaction, client) {
let message = {};
execute(interaction: any, client: any) {
let message: any = {};
if(!client.stations) {
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
@@ -20,7 +20,7 @@ export default {
if(radio && !client.config.maintenanceMode){
client.funcs.listStations(client, interaction);
} else {
let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
let stations = `${client.stations.map((s: { name: any; }) => `**#** ${s.name}`).join('\n')}`
const hashs = stations.split('**#**').length;
for (let i = 0; i < hashs; i++) {
stations = stations.replace('**#**', `**${i + 1}.**`);