Skip to content

Commit

Permalink
Fixed an apparent import that doesn't exist / Static reference
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Dec 10, 2016
1 parent 8840bd3 commit 089f2be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.awt.Color;
import java.io.File;

import com.sun.deploy.util.GeneralUtil;
import com.xelitexirish.logbot.handlers.FileHandler;
import com.xelitexirish.logbot.handlers.PermissionHandler;
import com.xelitexirish.logbot.utils.Constants;
Expand All @@ -15,10 +14,12 @@
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;


public class PurgeCommand implements ICommand {

private final String HELP_MSG = "Deletes the specified channel logs. Usage: '/log purge channel <mentioned channels>' or '/log purge temp'";

FileHandler fileHandler = new FileHandler();

@Override
public boolean called(String[] args, MessageReceivedEvent event) {
return true;
Expand Down Expand Up @@ -75,7 +76,7 @@ public void action(String[] args, MessageReceivedEvent event) {
MessageEmbed embed = eb.build();
event.getAuthor().getPrivateChannel().sendMessage(embed).queue();
}
FileHandler.delete(new File(FileHandler.getBaseFileDir() + "temp/"));
fileHandler.delete(new File(FileHandler.getBaseFileDir() + "temp/"));
}
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static File getTempFolder() {
return tempFolder;
}

public static void delete(File file) {
public void delete(File file) {
if (file.isDirectory()) {
Arrays.stream(file.listFiles()).forEach(this::delete);
}
Expand Down

0 comments on commit 089f2be

Please sign in to comment.