This commit is contained in:
Andrey Kondratev
2025-08-29 18:26:00 +05:00
parent 9bdf522f59
commit 82d2713d15
6 changed files with 36 additions and 8 deletions

View File

@@ -250,11 +250,11 @@ export class QuixoticBot {
}
// Public method for external API calls
public async sendAudioFile(chatId: number, audioUrl: string, title: string): Promise<void> {
return this.sendAudioFileInternal(chatId, audioUrl, title);
public async sendAudioFile(chatId: number, audioUrl: string, title: string, performer?: string, thumbnail?: string): Promise<void> {
return this.sendAudioFileInternal(chatId, audioUrl, title, performer, thumbnail);
}
private async sendAudioFileInternal(chatId: number, audioUrl: string, title: string): Promise<void> {
private async sendAudioFileInternal(chatId: number, audioUrl: string, title: string, performer?: string, thumbnail?: string): Promise<void> {
try {
console.log(`📤 Sending: ${title} to chat ${chatId}`);
@@ -262,8 +262,9 @@ export class QuixoticBot {
try {
await this.bot.sendAudio(chatId, audioUrl, {
title: title,
performer: 'SoundCloud',
performer: performer || 'SoundCloud',
caption: `🎵 ${title}`,
thumbnail: thumbnail,
parse_mode: undefined
});
console.log(`✅ Audio sent: ${title}`);