mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 17:03:38 +00:00
Typescript rework continue
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { ActionRowBuilder, EmbedBuilder, StringSelectMenuBuilder } from "discord.js";
|
||||
import Streamer from "../classes/Streamer";
|
||||
import commands from "../commands";
|
||||
const _importDynamic = new Function('modulePath', 'return import(modulePath)');
|
||||
// @ts-ignore
|
||||
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
|
||||
@ -120,7 +121,7 @@ export default {
|
||||
case "6":
|
||||
client.config.maintenanceMode = true;
|
||||
client.user.setStatus('idle');
|
||||
require(`../commands.js`).execute(client);
|
||||
commands.execute(client);
|
||||
client.user.setStatus('online');
|
||||
client.config.maintenanceMode = false;
|
||||
break;
|
||||
|
@ -1,15 +1,12 @@
|
||||
import { PermissionFlagsBits } from "discord.js";
|
||||
const {
|
||||
getVoiceConnection,
|
||||
joinVoiceChannel
|
||||
} = require("@discordjs/voice");
|
||||
import { ApplicationCommandOptionType, PermissionFlagsBits } from "discord.js";
|
||||
import { getVoiceConnection, joinVoiceChannel } from "@discordjs/voice";
|
||||
|
||||
export default {
|
||||
name: "play",
|
||||
usage: "<song name>",
|
||||
description: "Play radio",
|
||||
options: [
|
||||
{ type: "STRING", name: "query", description: "Select station", required: false}
|
||||
{ type: ApplicationCommandOptionType.String, name: "query", description: "Select station", required: false}
|
||||
],
|
||||
category: "radio",
|
||||
async execute(interaction: any, client: any) {
|
||||
@ -111,7 +108,7 @@ export default {
|
||||
}
|
||||
|
||||
let date = new Date();
|
||||
const construct = {
|
||||
const construct: any = {
|
||||
textChannel: interaction.channel,
|
||||
voiceChannel: voiceChannel,
|
||||
connection: null,
|
||||
|
Reference in New Issue
Block a user