TypeScript types

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

No files matched your search

+2 -2
View File
@@ -2,11 +2,11 @@ export default {
name: 'prev',
description: 'Previous 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 == -1) index = client.stations.length - 1;
let station = client.stations[index];