im quite new to PircbotX and I have searched the docs and the wiki but didn't find a solution for my problem.
Whenn a DCC file transfer request is accpeted and the transfer is started like this.
public class DccOutgoingChatExample extends ListenerAdapter {
@Override
public void onIncomingFileTransfer(IncomingFileTransferEvent event) throws Exception {
//Generate a file prefix
String prefix = "pircbotxFile" + System.currentTimeMillis() + "-";
//File suffix is the original filename plus .txt to prevent executables
String suffix = event.getSafeFilename() + ".txt";
//Create this file in the temp directory
File file = File.createTempFile(prefix, suffix);
//Receive the file from the user
event.accept(file).transfer();
}
}