mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-02 12:43:36 +00:00
TypeScript types
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
export default function check(client, interaction, command) {
|
||||
let message = {};
|
||||
export default function check(client: any, interaction: any, command: any) {
|
||||
let message: any = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if(client.config.maintenanceMode){
|
||||
interaction.reply({
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default function isDev(devList, authorID){
|
||||
export default function isDev(devList : any, authorID : any){
|
||||
let response = false;
|
||||
Object.keys(devList).forEach(function(oneDev) {
|
||||
let devID = devList[oneDev];
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { ActionRowBuilder, StringSelectMenuBuilder } from "discord.js";
|
||||
import { ActionRowBuilder, Interaction, StringSelectMenuBuilder } from "discord.js";
|
||||
|
||||
export default function listStations(client, interaction){
|
||||
let stations = new Array();
|
||||
let options = new Array();
|
||||
export default function listStations(client: any, interaction: any){
|
||||
let stations: any = new Array();
|
||||
let options: any = new Array();
|
||||
|
||||
stations = client.stations.forEach(station => {
|
||||
stations = client.stations.forEach((station: { name?: any; owner?: any; label?: any; description?: any; value?: any; }) => {
|
||||
if(station.name == "GrooveFM") return;
|
||||
station = {
|
||||
label: station.name,
|
||||
|
@ -1,4 +1,6 @@
|
||||
export default function loadState(client, guild){
|
||||
import { Guild } from "discord.js";
|
||||
|
||||
export default function loadState(client: any, guild: Guild){
|
||||
let data = client.datastore.getEntry(guild.id);
|
||||
if(!data) return;
|
||||
let state;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default function logger(area, text){
|
||||
export default function logger(area : string, text: string){
|
||||
let date = new Date();
|
||||
console.log('[' + area + '] – ' + date.toISOString());
|
||||
if(text) console.log(text + '\n');
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default function msToTime(duration) {
|
||||
export default function msToTime(duration : number) {
|
||||
let seconds = Math.floor((duration / 1000) % 60),
|
||||
minutes = Math.floor((duration / (1000 * 60)) % 60),
|
||||
hours = Math.floor((duration / (1000 * 60 * 60)) % 24),
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js";
|
||||
|
||||
export default async function play(client, interaction, guild, station) {
|
||||
let message = {};
|
||||
export default async function play(client: any, interaction: any, guild: any, station: any) {
|
||||
let message: any = {};
|
||||
const radio = client.radio.get(guild.id);
|
||||
const audioPlayer = client.streamer.listen(station);
|
||||
radio.connection.subscribe(audioPlayer);
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default function saveState(client, guild, radio){
|
||||
export default function saveState(client: any, guild: any, radio: any){
|
||||
client.datastore.checkEntry(guild.id);
|
||||
|
||||
let date = new Date();
|
||||
|
Reference in New Issue
Block a user