Move to ESM, use ytsr, implement caching

Closes #315
This commit is contained in:
Max Isom 2021-09-19 22:04:34 -04:00
parent efcdeb78c8
commit fd782219ef
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
31 changed files with 314 additions and 158 deletions

View file

@ -1,33 +1,34 @@
import 'reflect-metadata';
import {Container} from 'inversify';
import {TYPES} from './types';
import Bot from './bot';
import {TYPES} from './types.js';
import Bot from './bot.js';
import {Client} from 'discord.js';
import ConfigProvider from './services/config';
import ConfigProvider from './services/config.js';
// Managers
import PlayerManager from './managers/player';
import PlayerManager from './managers/player.js';
// Helpers
import GetSongs from './services/get-songs';
import NaturalLanguage from './services/natural-language-commands';
import GetSongs from './services/get-songs.js';
import NaturalLanguage from './services/natural-language-commands.js';
// Comands
import Command from './commands';
import Clear from './commands/clear';
import Config from './commands/config';
import Disconnect from './commands/disconnect';
import ForwardSeek from './commands/fseek';
import Help from './commands/help';
import Pause from './commands/pause';
import Play from './commands/play';
import QueueCommad from './commands/queue';
import Seek from './commands/seek';
import Shortcuts from './commands/shortcuts';
import Shuffle from './commands/shuffle';
import Skip from './commands/skip';
import Unskip from './commands/unskip';
import ThirdParty from './services/third-party';
import Clear from './commands/clear.js';
import Config from './commands/config.js';
import Disconnect from './commands/disconnect.js';
import ForwardSeek from './commands/fseek.js';
import Help from './commands/help.js';
import Pause from './commands/pause.js';
import Play from './commands/play.js';
import QueueCommad from './commands/queue.js';
import Seek from './commands/seek.js';
import Shortcuts from './commands/shortcuts.js';
import Shuffle from './commands/shuffle.js';
import Skip from './commands/skip.js';
import Unskip from './commands/unskip.js';
import ThirdParty from './services/third-party.js';
import CacheProvider from './services/cache.js';
let container = new Container();
@ -67,4 +68,6 @@ container.bind(TYPES.Config).toConstantValue(new ConfigProvider());
// Static libraries
container.bind(TYPES.ThirdParty).to(ThirdParty);
container.bind(TYPES.Cache).to(CacheProvider);
export default container;