Compare commits
3 Commits
renovate/o
...
bbd0299103
| Author | SHA1 | Date | |
|---|---|---|---|
| bbd0299103 | |||
| bb674240bb | |||
| 5a34e5994e |
66
pom.xml
66
pom.xml
@@ -22,7 +22,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.dv8tion</groupId>
|
<groupId>net.dv8tion</groupId>
|
||||||
<artifactId>JDA</artifactId>
|
<artifactId>JDA</artifactId>
|
||||||
<version>5.6.1</version>
|
<version>5.5.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- JDA depends on SLF4J for logging -->
|
<!-- JDA depends on SLF4J for logging -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -40,27 +40,27 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.51.0.0</version>
|
<version>3.49.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Dependency used for YAML configuration files -->
|
<!-- Dependency used for YAML configuration files -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.yaml</groupId>
|
<groupId>org.yaml</groupId>
|
||||||
<artifactId>snakeyaml</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
<version>2.5</version>
|
<version>2.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JSoup is used to parse HTML into JSON objects for better handling in Java -->
|
<!-- JSoup is used to parse HTML into JSON objects for better handling in Java -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jsoup</groupId>
|
<groupId>org.jsoup</groupId>
|
||||||
<artifactId>jsoup</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
<version>1.21.2</version>
|
<version>1.19.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Various String manipulation utils -->
|
<!-- Various String manipulation utils -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-text</artifactId>
|
<artifactId>commons-text</artifactId>
|
||||||
<version>1.14.0</version>
|
<version>1.13.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- JSON dependency used for better parsing of JSON files -->
|
<!-- JSON dependency used for better parsing of JSON files -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -78,12 +78,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.13.2</version>
|
<version>2.13.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
<version>1.20.0</version>
|
<version>1.18.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- End Random.org dependencies -->
|
<!-- End Random.org dependencies -->
|
||||||
|
|
||||||
@@ -91,9 +91,51 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>6.0.1</version>
|
<version>5.13.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Spring + JPA stack (non-Boot setup) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
<version>6.2.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-tx</artifactId>
|
||||||
|
<version>6.2.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-orm</artifactId>
|
||||||
|
<version>6.2.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.data</groupId>
|
||||||
|
<artifactId>spring-data-jpa</artifactId>
|
||||||
|
<version>3.3.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Hibernate core + SQLite dialects -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.orm</groupId>
|
||||||
|
<artifactId>hibernate-core</artifactId>
|
||||||
|
<version>6.6.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.orm</groupId>
|
||||||
|
<artifactId>hibernate-community-dialects</artifactId>
|
||||||
|
<version>6.6.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Jakarta Persistence API (usually provided via Hibernate, but include explicitly for compile-time types) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.persistence</groupId>
|
||||||
|
<artifactId>jakarta.persistence-api</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<!-- override dependencies to use newer versions -->
|
<!-- override dependencies to use newer versions -->
|
||||||
@@ -102,7 +144,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<groupId>com.google.protobuf</groupId>
|
||||||
<artifactId>protobuf-java</artifactId>
|
<artifactId>protobuf-java</artifactId>
|
||||||
<version>4.33.0</version>
|
<version>4.31.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
@@ -143,19 +185,19 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.12.0</version>
|
<version>3.11.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||||
<artifactId>sonar-maven-plugin</artifactId>
|
<artifactId>sonar-maven-plugin</artifactId>
|
||||||
<version>5.3.0.6276</version>
|
<version>5.1.0.4751</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.owasp</groupId>
|
<groupId>org.owasp</groupId>
|
||||||
<artifactId>dependency-check-maven</artifactId>
|
<artifactId>dependency-check-maven</artifactId>
|
||||||
<version>12.1.8</version>
|
<version>12.1.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<failBuildOnCVSS>8</failBuildOnCVSS>
|
<failBuildOnCVSS>8</failBuildOnCVSS>
|
||||||
<!--suppress UnresolvedMavenProperty -->
|
<!--suppress UnresolvedMavenProperty -->
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package wtf.beatrice.hidekobot.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "command_runners")
|
||||||
|
public class CommandRunner
|
||||||
|
{
|
||||||
|
@Id
|
||||||
|
@Column(name = "message_id", nullable = false)
|
||||||
|
private String messageId;
|
||||||
|
|
||||||
|
@Column(name = "guild_id", nullable = false)
|
||||||
|
private String guildId;
|
||||||
|
|
||||||
|
@Column(name = "channel_id", nullable = false)
|
||||||
|
private String channelId;
|
||||||
|
|
||||||
|
@Column(name = "user_id", nullable = false)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column(name = "channel_type", nullable = false)
|
||||||
|
private String channelType; // store JDA enum name
|
||||||
|
|
||||||
|
public String getMessageId()
|
||||||
|
{
|
||||||
|
return messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageId(String messageId)
|
||||||
|
{
|
||||||
|
this.messageId = messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuildId()
|
||||||
|
{
|
||||||
|
return guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuildId(String guildId)
|
||||||
|
{
|
||||||
|
this.guildId = guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelId()
|
||||||
|
{
|
||||||
|
return channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelId(String channelId)
|
||||||
|
{
|
||||||
|
this.channelId = channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelType()
|
||||||
|
{
|
||||||
|
return channelType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelType(String channelType)
|
||||||
|
{
|
||||||
|
this.channelType = channelType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package wtf.beatrice.hidekobot.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "pending_disabled_messages")
|
||||||
|
public class PendingDisabledMessage
|
||||||
|
{
|
||||||
|
@Id
|
||||||
|
@Column(name = "message_id", nullable = false)
|
||||||
|
private String messageId;
|
||||||
|
|
||||||
|
@Column(name = "guild_id", nullable = false)
|
||||||
|
private String guildId;
|
||||||
|
|
||||||
|
@Column(name = "channel_id", nullable = false)
|
||||||
|
private String channelId;
|
||||||
|
|
||||||
|
@Column(name = "expiry_timestamp", nullable = false)
|
||||||
|
private String expiryTimestamp; // keep as String to match your format for now
|
||||||
|
|
||||||
|
public String getMessageId()
|
||||||
|
{
|
||||||
|
return messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageId(String messageId)
|
||||||
|
{
|
||||||
|
this.messageId = messageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuildId()
|
||||||
|
{
|
||||||
|
return guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuildId(String guildId)
|
||||||
|
{
|
||||||
|
this.guildId = guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelId()
|
||||||
|
{
|
||||||
|
return channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelId(String channelId)
|
||||||
|
{
|
||||||
|
this.channelId = channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpiryTimestamp()
|
||||||
|
{
|
||||||
|
return expiryTimestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpiryTimestamp(String expiryTimestamp)
|
||||||
|
{
|
||||||
|
this.expiryTimestamp = expiryTimestamp;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package wtf.beatrice.hidekobot.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "urban_dictionary")
|
||||||
|
public class UrbanDictionaryEntry
|
||||||
|
{
|
||||||
|
@Id
|
||||||
|
@Column(name = "message_id", nullable = false)
|
||||||
|
private String messageId;
|
||||||
|
|
||||||
|
@Column(name = "page", nullable = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@Column(name = "meanings", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String meanings;
|
||||||
|
|
||||||
|
@Column(name = "examples", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String examples;
|
||||||
|
|
||||||
|
@Column(name = "contributors", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String contributors;
|
||||||
|
|
||||||
|
@Column(name = "dates", nullable = false, columnDefinition = "TEXT")
|
||||||
|
private String dates;
|
||||||
|
|
||||||
|
@Column(name = "term", nullable = false)
|
||||||
|
private String term;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user