mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-26 13:46:19 +00:00
[AB-172] updating to JDA 4.2.1_254 and removing deprecated code from guava
This commit is contained in:
@@ -14,7 +14,7 @@ An example implementation of this bot can be seen [here](https://github.com/Shel
|
|||||||
|
|
||||||
|
|
||||||
## Technologies
|
## Technologies
|
||||||
* [JDA](https://github.com/DV8FromTheWorld/JDA/) The Discord API Wrapper in the version 4.1.1_167
|
* [JDA](https://github.com/DV8FromTheWorld/JDA/) The Discord API Wrapper in the version 4.2.1_254
|
||||||
* [Spring boot](https://github.com/spring-projects/spring-boot) is used as a framework to create standalone application in Java with Java EE methods. (including Dependency injection and more)
|
* [Spring boot](https://github.com/spring-projects/spring-boot) is used as a framework to create standalone application in Java with Java EE methods. (including Dependency injection and more)
|
||||||
* [Hibernate](https://github.com/hibernate/hibernate-orm) is used as a reference implementation of JPA.
|
* [Hibernate](https://github.com/hibernate/hibernate-orm) is used as a reference implementation of JPA.
|
||||||
* [Freemarker](https://github.com/apache/freemarker) is used as a templating engine. This is used to provide internationalization for user facing text and enable dynamic embed configuration.
|
* [Freemarker](https://github.com/apache/freemarker) is used as a templating engine. This is used to provide internationalization for user facing text and enable dynamic embed configuration.
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
package dev.sheldan.abstracto.core.utils;
|
package dev.sheldan.abstracto.core.utils;
|
||||||
|
|
||||||
import com.google.common.io.Files;
|
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@Slf4j
|
||||||
public class FileService {
|
public class FileService {
|
||||||
public void writeContentToFile(File file, String content) throws IOException {
|
public void writeContentToFile(File file, String content) throws IOException {
|
||||||
try(FileWriter fw = new FileWriter(file)) {
|
try(FileWriter fw = new FileWriter(file)) {
|
||||||
@@ -22,7 +25,12 @@ public class FileService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public File createTempFile(String fileName) {
|
public File createTempFile(String fileName) {
|
||||||
return new File(Files.createTempDir(), fileName);
|
try {
|
||||||
|
return new File(Files.createTempDirectory("").toFile(), fileName);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("Failed to create temporary file.");
|
||||||
|
throw new AbstractoRunTimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void safeDelete(File file) throws IOException {
|
public void safeDelete(File file) throws IOException {
|
||||||
|
|||||||
@@ -44,11 +44,16 @@
|
|||||||
<name>jcenter-bintray</name>
|
<name>jcenter-bintray</name>
|
||||||
<url>https://jcenter.bintray.com</url>
|
<url>https://jcenter.bintray.com</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>dv8tion</id>
|
||||||
|
<name>m2-dv8tion</name>
|
||||||
|
<url>https://m2.dv8tion.net/releases</url>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.build.timestamp.format>yyyy/MM/dd HH:mm</maven.build.timestamp.format>
|
<maven.build.timestamp.format>yyyy/MM/dd HH:mm</maven.build.timestamp.format>
|
||||||
<jda.version>4.2.0_180</jda.version>
|
<jda.version>4.2.1_254</jda.version>
|
||||||
<jda.utilities.version>3.0.4</jda.utilities.version>
|
<jda.utilities.version>3.0.4</jda.utilities.version>
|
||||||
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
|
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
|
||||||
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
|
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
|
||||||
|
|||||||
Reference in New Issue
Block a user