Add music from VK handler
This commit is contained in:
parent
ca0ea310a4
commit
eed568a681
10
src/vk.ts
10
src/vk.ts
|
@ -581,6 +581,16 @@ export class VkPuppet {
|
|||
await this.puppet.sendMessage(params, opts);
|
||||
}
|
||||
break;
|
||||
case AttachmentType.AUDIO:
|
||||
try {
|
||||
await this.puppet.sendAudio(params, f["url"]);
|
||||
} catch (err) {
|
||||
const opts: IMessageEvent = {
|
||||
body: `Music was sent: ${f["title"]} by ${f["artist"]} ${f["url"]}`,
|
||||
};
|
||||
await this.puppet.sendMessage(params, opts);
|
||||
}
|
||||
break;
|
||||
case AttachmentType.DOCUMENT:
|
||||
try {
|
||||
p.data.isUserToken ? await this.puppet.sendFileDetect(params, f["doc"]["url"], f["doc"]["title"])
|
||||
|
|
Loading…
Reference in a new issue