Typings in listStations function

This commit is contained in:
Christer Warén 2023-06-06 07:12:21 +03:00
parent 95216f5acc
commit 227e0bcaaa

View File

@ -1,8 +1,8 @@
import { ActionRowBuilder, SelectMenuComponentOptionData, StringSelectMenuBuilder } from "discord.js";
import { ActionRowBuilder, ButtonInteraction, ChatInputCommandInteraction, SelectMenuComponentOptionData, StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
import RadioClient from "../../Client";
import { station } from "../classes/Stations";
export default function listStations(client: RadioClient, interaction: any){
export default function listStations(client: RadioClient, interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction){
if(!client.stations) return;
let options : SelectMenuComponentOptionData[] = new Array();
@ -16,7 +16,7 @@ export default function listStations(client: RadioClient, interaction: any){
});
});
const menu = new ActionRowBuilder()
const menu: ActionRowBuilder<any> = new ActionRowBuilder()
.addComponents(
new StringSelectMenuBuilder()
.setCustomId('play')