mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 17:03:38 +00:00
More typings to classes, commands, events, funcs
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { ChatInputCommandInteraction, ColorResolvable, EmbedBuilder } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
import { command } from "../commands";
|
||||
|
||||
export default {
|
||||
name: 'help',
|
||||
@ -12,13 +13,13 @@ export default {
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
const categories : any= [];
|
||||
const categories: string[] = [];
|
||||
for (let i = 0; i < client.commands.size; i++) {
|
||||
if (!categories.includes([...client.commands.values()][i].category)) categories.push([...client.commands.values()][i].category);
|
||||
}
|
||||
let commands = '';
|
||||
for (let i = 0; i < categories.length; i++) {
|
||||
commands += `**» ${categories[i].toUpperCase()}**\n${client.commands.filter(x => x.category === categories[i]).map((x: { name: any; }) => `\`${x.name}\``).join(', ')}\n`;
|
||||
commands += `**» ${categories[i].toUpperCase()}**\n${client.commands.filter(x => x.category === categories[i]).map((x: command) => `\`${x.name}\``).join(', ')}\n`;
|
||||
}
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { ButtonInteraction, ChatInputCommandInteraction, ColorResolvable, EmbedBuilder, StringSelectMenuInteraction } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
import { command } from "../commands";
|
||||
|
||||
export default {
|
||||
name: 'nowplaying',
|
||||
description: 'Current Radio Station',
|
||||
category: 'radio',
|
||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: any) {
|
||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
||||
if(client.funcs.check(client, interaction, command)) {
|
||||
|
||||
const radio = client.radio?.get(interaction.guild?.id);
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ApplicationCommandOptionType, ChatInputCommandInteraction, GuildMember, PermissionFlagsBits, StringSelectMenuInteraction } from "discord.js";
|
||||
import { getVoiceConnection, joinVoiceChannel } from "@discordjs/voice";
|
||||
import RadioClient from "../../Client";
|
||||
import { radio } from "../classes/Radio"
|
||||
|
||||
export default {
|
||||
name: "play",
|
||||
@ -116,7 +117,7 @@ export default {
|
||||
}
|
||||
|
||||
let date = new Date();
|
||||
const construct: any = {
|
||||
const construct: radio = {
|
||||
textChannel: interaction.channel,
|
||||
voiceChannel: voiceChannel,
|
||||
connection: null,
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { ColorResolvable, EmbedBuilder } from "discord.js";
|
||||
import { ChatInputCommandInteraction, ColorResolvable, EmbedBuilder } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
|
||||
export default {
|
||||
name: 'status',
|
||||
description: 'Bot Status',
|
||||
category: 'info',
|
||||
async execute(interaction: any, client: RadioClient) {
|
||||
async execute(interaction: ChatInputCommandInteraction, client: RadioClient) {
|
||||
|
||||
if(!client.user) return interaction.reply({
|
||||
content: client.messages.emojis["error"] + client.messages.maintenance,
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { ButtonInteraction, ChatInputCommandInteraction, ColorResolvable, EmbedBuilder, StringSelectMenuInteraction } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
import { command } from "../commands";
|
||||
|
||||
export default {
|
||||
name: 'stop',
|
||||
description: 'Stop radio',
|
||||
category: 'radio',
|
||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: any) {
|
||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
const radio = client.radio?.get(interaction.guild?.id);
|
||||
client.statistics?.update(client, interaction.guild, radio);
|
||||
|
Reference in New Issue
Block a user