Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yvasyliev committed Jan 24, 2022
1 parent 7d60592 commit 813639d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ Easy:
```java
@Override
public void onMessageNew(MessageNew messageNew) {
try {
Message message = messageNew.getMessage();
vk.messages.send()
.setPeerId(message.getPeerId())
.setMessage("Sending some files to you...")
.addPhoto(new File("your_photo.png")) // to send photo as photo
.addDoc(new File("your_photo.png")) // to send photo as document
.execute();
} catch (VkApiException e) {
e.printStackTrace();
}
try {
Message message = messageNew.getMessage();
vk.messages.send()
.setPeerId(message.getPeerId())
.setMessage("Sending some files to you...")
.addPhoto(new File("your_photo.png")) // to send photo as photo
.addDoc(new File("your_photo.png")) // to send photo as document
.execute();
} catch (VkApiException e) {
e.printStackTrace();
}
}
```
## More Examples
Expand Down

0 comments on commit 813639d

Please sign in to comment.