Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1161b88
Top helpers not askers (#763)
Taz03 Feb 7, 2023
22b7984
removed vc activity command (#765)
Taz03 Feb 10, 2023
069b317
Bump com.diffplug.spotless from 6.14.0 to 6.15.0 (#770)
dependabot[bot] Feb 13, 2023
5fdfee1
Fixed bug with MediaOnlyChannelListener when user closed DMs (#769)
AthithyaIthayan Feb 14, 2023
5c68607
Bugfix with OOB when backticks are before language end (#767)
Zabuzard Feb 15, 2023
1dec9ab
Fix website bug with widget on mobile (#773)
AthithyaIthayan Feb 16, 2023
dc980bd
Bump gradle.plugin.org.flywaydb:gradle-plugin-publishing (#774)
dependabot[bot] Feb 17, 2023
03c94de
Bump org.flywaydb:flyway-core from 9.14.0 to 9.15.0 (#775)
dependabot[bot] Feb 17, 2023
ec73150
Bugfix ScamBlocker fails on DM (#776)
AthithyaIthayan Feb 19, 2023
aab2706
Bump org.sonarqube from 3.5.0.2730 to 4.0.0.2929 (#778)
dependabot[bot] Feb 20, 2023
5100500
Bump org.apache.logging.log4j:log4j-core from 2.19.0 to 2.20.0 (#780)
dependabot[bot] Feb 22, 2023
fdee956
Bump org.xerial:sqlite-jdbc from 3.40.0.0 to 3.41.0.0 (#784)
dependabot[bot] Feb 24, 2023
b96771f
SlashCommandEducator should check length (#783)
abhishekanuj26 Feb 25, 2023
3b97a62
Fixed ScamBlocker crashes if given empty list of actions bug (#786)
abhishekanuj26 Feb 27, 2023
2691154
Bump com.diffplug.spotless from 6.15.0 to 6.16.0 (#790)
dependabot[bot] Feb 28, 2023
384c66b
Handling /reminder failure cases (#779)
ankitsmt211 Mar 1, 2023
4739cbe
upgrade gradle (#791)
Taz03 Mar 1, 2023
094748b
Bump com.github.johnrengelman.shadow from 7.1.0 to 8.1.0 (#789)
dependabot[bot] Mar 1, 2023
630b1fd
Java 18 -> Java 19 (#792)
Zabuzard Mar 1, 2023
3389b3e
Added "Dismiss" text in CodeMessageHandler delete button (#793)
swashb0ckler Mar 1, 2023
330c4c7
Upgrade java to 19 for website subproject (#794)
marko-radosavljevic Mar 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/basic-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Basic checks
on: [pull_request]

env:
JAVA_VERSION: 18
JAVA_VERSION: 19

jobs:
spotless:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- cron: '0 20 * * 4'

env:
JAVA_VERSION: 18
JAVA_VERSION: 19

jobs:
sonar:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'master'

env:
JAVA_VERSION: 18
JAVA_VERSION: 19

jobs:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker Verify
on: [pull_request]

env:
JAVA_VERSION: 18
JAVA_VERSION: 19

jobs:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults:
shell: bash

env:
JAVA_VERSION: 18
JAVA_VERSION: 19

jobs:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# TJ-Bot

[![codefactor](https://img.shields.io/codefactor/grade/github/together-java/tj-bot)](https://www.codefactor.io/repository/github/together-java/tj-bot)
![Java](https://img.shields.io/badge/Java-18-ff696c)
![Java](https://img.shields.io/badge/Java-19-ff696c)
[![license](https://img.shields.io/github/license/Together-Java/TJ-Bot)](https://github.com/Together-Java/TJ-Bot/blob/master/LICENSE)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Together-Java/TJ-Bot?label=release)

Expand Down
8 changes: 4 additions & 4 deletions application/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
buildscript {
dependencies {
classpath 'org.xerial:sqlite-jdbc:3.40.0.0'
classpath 'org.xerial:sqlite-jdbc:3.41.0.0'
}
}

plugins {
id 'application'
id 'com.google.cloud.tools.jib' version '3.3.0'
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'com.github.johnrengelman.shadow' version '8.1.0'
id 'database-settings'
}

Expand All @@ -18,7 +18,7 @@ repositories {
var outputImage = 'togetherjava.org:5001/togetherjava/tjbot:' + System.getenv('BRANCH_NAME') ?: 'latest'

jib {
from.image = 'eclipse-temurin:18'
from.image = 'eclipse-temurin:19'
to {
image = outputImage
auth {
Expand Down Expand Up @@ -48,7 +48,7 @@ dependencies {

implementation 'net.dv8tion:JDA:5.0.0-alpha.20'

implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j18-impl:2.18.0'

implementation 'club.minnced:discord-webhooks:0.8.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public static Collection<Feature> createFeatures(JDA jda, Database database, Con
features.add(new TagCommand(tagSystem));
features.add(new TagManageCommand(tagSystem, modAuditLogWriter));
features.add(new TagsCommand(tagSystem));
features.add(new VcActivityCommand());
features.add(new WarnCommand(actionsStore));
features.add(new KickCommand(actionsStore));
features.add(new BanCommand(actionsStore));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* then educates the user about using slash commands, such as {@code /foo} instead.
*/
public final class SlashCommandEducator extends MessageReceiverAdapter {
private static final int MAX_COMMAND_LENGTH = 30;
private static final String SLASH_COMMAND_POPUP_ADVICE_PATH = "slashCommandPopupAdvice.png";
private static final Predicate<String> IS_MESSAGE_COMMAND = Pattern.compile("""
[.!?] #Start of message command
Expand All @@ -33,7 +34,8 @@ public void onMessageReceived(MessageReceivedEvent event) {
}

String content = event.getMessage().getContentRaw();
if (IS_MESSAGE_COMMAND.test(content)) {

if (IS_MESSAGE_COMMAND.test(content) && content.length() < MAX_COMMAND_LENGTH) {
sendAdvice(event.getMessage());
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.emoji.Emoji;
import net.dv8tion.jda.api.events.interaction.ModalInteractionEvent;
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
import net.dv8tion.jda.api.events.interaction.component.SelectMenuInteractionEvent;
Expand Down Expand Up @@ -139,9 +138,8 @@ private List<Button> createButtons(long originalMessageId,

private Button createDeleteButton(long originalMessageId) {
String noCodeActionLabel = "";
return Button.danger(componentIdInteractor
.generateComponentId(Long.toString(originalMessageId), noCodeActionLabel, DELETE_CUE),
Emoji.fromUnicode("🗑"));
return Button.danger(componentIdInteractor.generateComponentId(
Long.toString(originalMessageId), noCodeActionLabel, DELETE_CUE), "Dismiss");
}

private Button createButtonForAction(CodeAction action, long originalMessageId) {
Expand Down
Loading