Skip to content

Commit

Permalink
Ответ по peerid
Browse files Browse the repository at this point in the history
  • Loading branch information
MEFRREEX committed Mar 9, 2023
1 parent 4026f3f commit 59994bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/theoni/vkbot/managers/BotManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ public BotManager(GroupActor actor) {

public void sendMessage(String text, Message message, Keyboard keyboard) {
try {
vk.messages().send(actor).message(text).userId(message.getFromId()).randomId(random.nextInt(10000)).keyboard(keyboard).execute();
vk.messages().send(actor).message(text).peerId(message.getPeerId()).randomId(random.nextInt(10000)).keyboard(keyboard).execute();
} catch (ApiException | ClientException e) {
e.printStackTrace();
}
}

public void sendMessage(String text, Message message) {
try {
vk.messages().send(actor).message(text).userId(message.getFromId()).randomId(random.nextInt(10000)).execute();
vk.messages().send(actor).message(text).peerId(message.getPeerId()).randomId(random.nextInt(10000)).execute();
} catch (ApiException | ClientException e) {
e.printStackTrace();
}
}

public void sendMessage(String text, Integer id, Keyboard keyboard) {
try {
vk.messages().send(actor).message(text).userId(id).randomId(random.nextInt(10000)).keyboard(keyboard).execute();
vk.messages().send(actor).message(text).peerId(id).randomId(random.nextInt(10000)).keyboard(keyboard).execute();
} catch (ApiException | ClientException e) {
e.printStackTrace();
}
}

public void sendMessage(String text, Integer id) {
try {
vk.messages().send(actor).message(text).userId(id).randomId(random.nextInt(10000)).execute();
vk.messages().send(actor).message(text).peerId(id).randomId(random.nextInt(10000)).execute();
} catch (ApiException | ClientException e) {
e.printStackTrace();
}
Expand All @@ -64,7 +64,7 @@ public Integer getTs() {
}

public MessagesGetLongPollHistoryQuery getHistoryQuery(Integer ts) {
MessagesGetLongPollHistoryQuery historyQuery = vk.messages().getLongPollHistory(actor).ts(ts);
MessagesGetLongPollHistoryQuery historyQuery = vk.messages().getLongPollHistory(actor).ts(ts);
return historyQuery;
}

Expand Down

0 comments on commit 59994bd

Please sign in to comment.