Skip to content

Commit

Permalink
fix: ffmpeg dependency report
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite committed Dec 6, 2024
1 parent 8d9aceb commit e043c30
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 150 deletions.
2 changes: 1 addition & 1 deletion apps/eris-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"discord-player": "workspace:^",
"dotenv": "^16.4.5",
"eris": "^0.17.2",
"mediaplex": "^0.0.9"
"mediaplex": "^1.0.0"
}
}
3 changes: 2 additions & 1 deletion apps/eris-bot/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import Eris from 'eris';
import { Player, createErisCompat } from 'discord-player';
import { DefaultExtractors } from '@discord-player/extractor';

const client = Eris(process.env.DISCORD_TOKEN!, {
intents: ['all'],
Expand All @@ -10,7 +11,7 @@ const player = new Player(createErisCompat(client));

player.on('debug', console.log).events.on('debug', (queue, msg) => console.log(`[${queue.guild.name}] ${msg}`));

player.extractors.loadDefault();
player.extractors.loadMulti(DefaultExtractors);

client.once('ready', () => {
console.log('Ready!');
Expand Down
3 changes: 2 additions & 1 deletion apps/music-bot/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable */
import { Player } from 'discord-player';
import { DefaultExtractors } from '@discord-player/extractor';
import { Client, Events, IntentsBitField } from 'discord.js';
import { PlayCommand } from './play';
import { NowPlayingCommand } from './nowplaying';
Expand All @@ -18,7 +19,7 @@ const client = new Client({
const player = Player.create(client);

client.once(Events.ClientReady, async () => {
await player.extractors.loadDefault();
await player.extractors.loadMulti(DefaultExtractors);
console.log('Ready!');
});

Expand Down
4 changes: 3 additions & 1 deletion apps/music-bot/src/nowplaying.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ export const NowPlayingCommand = async (message: Message) => {
return message.channel.send('There is no track playing.');
}

await message.channel.send(`Now playing: ${currentTrack.title} by ${currentTrack.author}`);
await message.channel.send(
`Now playing: ${currentTrack.title} by ${currentTrack.author}\n${queue.node.createProgressBar()}`,
);
};
2 changes: 1 addition & 1 deletion packages/discord-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@
"readmeFile": "./README.md",
"tsconfig": "./tsconfig.json"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ export const DependencyReportGenerator = {

for (const _subKey of subKeys) {
const subKey = _subKey as keyof DependenciesReport[typeof key];
const value = report[key][subKey] ?? 'N/A';

output.push(`- ${subKey}: ${report[key][subKey] ?? 'N/A'}`);
output.push(`- ${subKey}: ${typeof value === 'object' ? JSON.stringify(value, null, 2) : value}`);
}

output.push('');
Expand Down
2 changes: 1 addition & 1 deletion packages/discord-voip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
"tsup": "^8.2.4",
"typescript": "^5.5.4"
}
}
}
2 changes: 1 addition & 1 deletion packages/equalizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
"readmeFile": "./README.md",
"tsconfig": "./tsconfig.json"
}
}
}
4 changes: 2 additions & 2 deletions packages/extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@discord-player/tsconfig": "workspace:^",
"@types/node": "^20.14.11",
"discord-player": "workspace:^",
"mediaplex": "^0.0.7",
"mediaplex": "^1.0.0",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
Expand All @@ -58,4 +58,4 @@
"readmeFile": "./README.md",
"tsconfig": "./tsconfig.json"
}
}
}
2 changes: 1 addition & 1 deletion packages/ffmpeg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"typescript": "^5.2.2",
"vitest": "^0.34.6"
}
}
}
2 changes: 1 addition & 1 deletion packages/opus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
"typescript": "^5.2.2",
"vitest": "^0.34.6"
}
}
}
2 changes: 1 addition & 1 deletion packages/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"devDependencies": {
"typescript": "^5.2.2"
}
}
}
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
"readmeFile": "./README.md",
"tsconfig": "./tsconfig.json"
}
}
}
Loading

0 comments on commit e043c30

Please sign in to comment.