Skip to content

Commit

Permalink
Merge pull request #6 from Varilx-Development/feat/check-channel-for-…
Browse files Browse the repository at this point in the history
…chatbridge

check channel for chatbridge
  • Loading branch information
Knerio authored Jan 1, 2025
2 parents 21b1e95 + a1b6de8 commit cba1888
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation("org.jetbrains:annotations:26.0.1")

// Base API
implementation("de.varilx:base-api:0.4.0")
implementation("de.varilx:base-api:0.4.1")

// JDA
implementation("net.dv8tion:JDA:5.2.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void onLoad() {

@Override
public void onEnable() {
new BaseAPI(this).enable();
new BaseAPI(this, 24308).enable();

Service service = Service.load(BaseAPI.getBaseAPI().getDatabaseConfiguration().getConfig(), getClassLoader());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public void onMessageReceived(@NotNull MessageReceivedEvent event) {

if (!event.getChannel().getType().isGuild() || !event.getChannel().getType().isMessage()) return;
if (event.getAuthor().isBot()) return;
if (!event.getChannel().getId().equalsIgnoreCase(configuration.getConfig().getString("chatbridge.channel"))) return;
if (!LanguageUtils.getMessageString("chatbridge.discord-message.enabled").equalsIgnoreCase("true")) return;
this.linkedUserRepository.findFirstById(event.getAuthor().getIdLong()).thenAcceptAsync(user -> {
if (user == null && BaseAPI.getBaseAPI().getConfiguration().getConfig().getBoolean("discord-link.enforce")) {
Expand Down

0 comments on commit cba1888

Please sign in to comment.