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

@ -2,11 +2,11 @@ export default {
name: 'next',
description: 'Next Station',
category: 'radio',
async execute(interaction, client, command) {
async execute(interaction: any, client: any, command: any) {
if (client.funcs.check(client, interaction, command)) {
const radio = client.radio.get(interaction.guild.id);
let index = client.stations.findIndex(station => station.name == radio.station.name) + 1;
let index = client.stations.findIndex((station: { name: any; }) => station.name == radio.station.name) + 1;
if(index == client.stations.length) index = 0;
let station = client.stations[index];