We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Создаю объект бота
const vk = new VK({ token: process.env.TOKEN_VK, apiMode: 'parallel_selected', apiExecuteMethods: ['messages.send', 'messages.delete', 'messages.edit', 'messages.getConversationsById', 'messages.getConversationMembers', 'messages.removeChatUser', `users.get`, `messages.deleteReaction`, `messages.getInviteLink`, `messages.sendMessageEventAnswer`, `messages.setActivity`], apiExecuteUnsupportedMethods: [ 'photos.save', 'photos.saveWallPhoto', 'photos.saveOwnerPhoto', 'photos.saveMessagesPhoto', 'messages.setChatPhoto', 'photos.saveMarketPhoto', 'photos.saveMarketAlbumPhoto', 'audio.save', 'docs.save', 'photos.saveOwnerCoverPhoto', 'stories.save', 'polls.savePhoto', 'docs.add', 'docs.getUploadServer', 'docs.getWallUploadServer', 'docs.get', ], apiRequestMode: 'burst', apiLimit: 20, });
Загружаю документ
const attachment = await upload.messageDocument({ peer_id: msg.peerId, source: { value: `${patch}/logs-${nickname}.txt`, filename: `logs-${nickname}.txt`, contentType: 'document/txt' } });
Пытаюсь отправить сообщение с attachment
attachment
return msg.answer(`История действий над пользователем @id${playerVkID}(${nickname}) выгружена!`, {attachment});
Сообщение отправиться вместе с документом
Сообщение отправляется без файла Однако, если я перемещу messages.send из apiExecuteMethods в apiExecuteUnsupportedMethods, то файл загрузиться
apiExecuteMethods
apiExecuteUnsupportedMethods
upload выглядит вот так
upload
const vkapi = new VK({ token: process.env.TOKEN_VK, }); const upload = new Upload({ api: vkapi.api });
vk-io
4.8.3
node
18.12.1
TypeScript
-
npm
yarn
8.19.2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What did you do?
Создаю объект бота
Загружаю документ
Пытаюсь отправить сообщение с
attachment
What did you expect to happen?
Сообщение отправиться вместе с документом
What was the actual result?
Сообщение отправляется без файла
Однако, если я перемещу messages.send из
apiExecuteMethods
вapiExecuteUnsupportedMethods
, то файл загрузитьсяAdditional Info
upload
выглядит вот такVersions
vk-io
4.8.3
node
18.12.1
TypeScript
-
npm
oryarn
8.19.2
The text was updated successfully, but these errors were encountered: