Skip to content

Commit

Permalink
update production deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkGoosik committed May 5, 2024
1 parent 67700b0 commit 01219eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ jobs:
with:
name: Artifacts
path: build/libs/kitsun.jar
- name: Deploy Stage
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.RESTART_URL }}
method: 'GET'
preventFailureOnNoResponse: 'true'
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package ru.pinkgoosik.kitsun.feature;

import net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion;
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
import net.dv8tion.jda.api.events.session.ReadyEvent;
import ru.pinkgoosik.kitsun.Bot;

import java.util.ArrayList;
import java.util.Objects;

public class KitsunDebugger {
private static String debugChannel = "967506328190877726";
Expand Down Expand Up @@ -34,7 +33,9 @@ private static void sendMessage(String text) {
if(reported.equals(text)) return;
}
try {
Objects.requireNonNull(Bot.jda.getChannelById(MessageChannelUnion.class, debugChannel)).sendMessage(text).queue();
if(Bot.jda.getGuildChannelById(debugChannel) instanceof TextChannel textChannel) {
textChannel.sendMessage(text).queue();
}
CACHE.add(text);
}
catch(Exception e) {
Expand Down

0 comments on commit 01219eb

Please sign in to comment.