Skip to content

Commit

Permalink
Update chat record file upload text send
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksgata committed Dec 5, 2022
1 parent 666bd71 commit e53e488
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ public File recordsFileCreate(String text) throws IOException {
public void recordFileUpload(GroupMessageEvent groupMessageEvent) {
try {
File file = recordsFileCreate(JSONObject.toJSONString(GlobalData.groupChatRecordDataMap.get(groupMessageEvent.getGroup().getId() + "")));

ExternalResource resource = ExternalResource.create(file);
groupMessageEvent.getGroup().getFiles().uploadNewFile("/" + file.getName(), resource);
resource.close();
file.delete();
groupMessageEvent.getGroup().sendMessage("聊天记录文件可通过该网址进行解析操作:https://tool.rulatedaydice.ga/#/tools/record");
} catch (IOException e) {
groupMessageEvent.getGroup().sendMessage("本地文件生成失败,无法输出聊天记录文件");
groupMessageEvent.getGroup().sendMessage("本地文件生成失败,无法输出聊天记录文件");
}
}

Expand Down

0 comments on commit e53e488

Please sign in to comment.