forked from SteamWar/SteamWar
Check why StaticMessageChannel does not work?
This commit is contained in:
@@ -159,6 +159,7 @@ public class DiscordBot {
|
|||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
actionRows.add(ActionRow.of(list.toArray(Button[]::new)));
|
actionRows.add(ActionRow.of(list.toArray(Button[]::new)));
|
||||||
}
|
}
|
||||||
|
System.out.println("Initializing Ticket channel");
|
||||||
new StaticMessageChannel(config.channel("ticket"), () -> new MessageCreateBuilder()
|
new StaticMessageChannel(config.channel("ticket"), () -> new MessageCreateBuilder()
|
||||||
.setEmbeds(new EmbedBuilder()
|
.setEmbeds(new EmbedBuilder()
|
||||||
.setDescription("Hier kannst du Tickets öffnen, welche nur von dir und Teammitgliedern eingesehen werden können.")
|
.setDescription("Hier kannst du Tickets öffnen, welche nur von dir und Teammitgliedern eingesehen werden können.")
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public class StaticMessageChannel extends DiscordChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
|
System.out.println("Initializing " + getChannel());
|
||||||
if(getChannel().getLatestMessageIdLong() != 0)
|
if(getChannel().getLatestMessageIdLong() != 0)
|
||||||
message = getChannel().getIterableHistory().complete().stream().filter(m -> m.getAuthor().isBot()).findFirst().orElse(null);
|
message = getChannel().getIterableHistory().complete().stream().filter(m -> m.getAuthor().isBot()).findFirst().orElse(null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user