Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.fancyinnovations.fancyfriend.events.Events;
import com.fancyinnovations.fancyfriend.events.JoinLeaveListener;
import com.fancyinnovations.fancyfriend.utils.Modrinth;
import de.oliver.fancyanalytics.logger.ExtendedFancyLogger;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.OnlineStatus;
Expand All @@ -18,6 +18,8 @@

import java.util.concurrent.TimeUnit;

import de.oliver.fancyanalytics.logger.ExtendedFancyLogger;

public class FancyFriend {

private static ExtendedFancyLogger logger = new ExtendedFancyLogger("FancyFriend");
Expand Down Expand Up @@ -92,7 +94,7 @@ public void initJDA() {
new Command.Choice("Latest", "latest"));

jda.getGuildById(GUILD_ID).updateCommands().addCommands(
Commands.slash("logs", "Use pastes.dev for logs"),
Commands.slash("logs", "Requests logs be uploaded to mclo.gs"),
Commands.slash("bedrock", "Bedrock Edition support information"),
Commands.slash("blankline", "How to add a blank line in a hologram"),
Commands.slash("clickable", "Clickable FancyHolograms tutorial"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
event.deferReply(event.getName().equalsIgnoreCase("noping")).queue();

switch (event.getName()) {
case "logs" -> event.getHook().editOriginal("Please use **[pastes.dev](<https://pastes.dev/>)**, **[mclo.gs](<https://mclo.gs/>)** or a similar service to upload your server logs.")
case "logs" -> event.getHook().editOriginal("Please upload your logs to <https://mclo.gs> and send us the link.")
.queue();

case "bedrock" -> event.getHook().editOriginal("Bedrock Edition is **not** supported and never will be. Our plugins are designed exclusively for Java Edition servers.").queue();
Expand Down Expand Up @@ -173,7 +173,7 @@ Older versions of Pufferfish (<= 1.19.4) may not fully support Paper plugins. Re
3. **Plugins List** (Upon Request)
Send a screenshot or copy-paste the output of `/plugins` command.
4. **Server Logs** (Upon Request)
Logs can be uploaded to **[pastes.dev](<https://pastes.dev/>)**, **[mclo.gs](<https://mclo.gs/>)** or a similar service.
Upload your logs to <https://mclo.gs> and send the link.

If you haven't already, make sure to describe the issue in as much detail as possible.
""")
Expand All @@ -189,8 +189,8 @@ Older versions of Pufferfish (<= 1.19.4) may not fully support Paper plugins. Re

private void handleDownload(SlashCommandInteractionEvent event) {
String pluginId = event.getOption("plugin").getAsString();
String channel = event.getOption("channel") != null
? event.getOption("channel").getAsString()
String channel = event.getOption("channel") != null
? event.getOption("channel").getAsString()
: null;

String pluginName;
Expand All @@ -206,7 +206,7 @@ private void handleDownload(SlashCommandInteractionEvent event) {

String downloadUrl;
String channelDisplay;

if (channel == null || channel.equals("latest")) {
// Default to Latest or explicitly selected Latest
downloadUrl = "https://modrinth.com/plugin/" + pluginId + "/version/latest";
Expand All @@ -216,7 +216,7 @@ private void handleDownload(SlashCommandInteractionEvent event) {
downloadUrl = "https://modrinth.com/plugin/" + pluginId + "/versions?c=" + channel;
channelDisplay = channel.equals("release") ? "Release" : "Dev";
}

event.getHook().editOriginal(
"**" + pluginName + "** (" + channelDisplay + ")\n" +
"Download: " + downloadUrl
Expand Down