mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-02 03:03:37 +00:00
Typescript Continue
This commit is contained in:
@ -14,7 +14,7 @@ export default class {
|
||||
fs.mkdirSync(dir);
|
||||
}
|
||||
//console.log("");
|
||||
const dataFiles = fs.readdirSync(path.join(path.dirname(__dirname), '../../datastore')).filter(f => f.endsWith('.json'));
|
||||
const dataFiles = fs.readdirSync(path.join(path.dirname(__dirname), '../../datastore')).filter((f: string) => f.endsWith('.json'));
|
||||
for (const file of dataFiles) {
|
||||
try {
|
||||
const json = require(`../../../datastore/${file}`);
|
||||
|
@ -47,7 +47,7 @@ export default class Radio extends Map {
|
||||
|
||||
if(!station) return;
|
||||
|
||||
const construct = {
|
||||
const construct: any = {
|
||||
textChannel: client.channels.cache.get(state.channels.text),
|
||||
voiceChannel: client.channels.cache.get(state.channels.voice),
|
||||
connection: null,
|
||||
|
@ -1,5 +1,6 @@
|
||||
const _importDynamic = new Function('modulePath', 'return import(modulePath)');
|
||||
const fetch = (...args: any) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
|
||||
// @ts-ignore
|
||||
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
|
||||
|
||||
export default class Stations extends Array {
|
||||
logger: any;
|
||||
|
Reference in New Issue
Block a user