discord improvements?
This commit is contained in:
@@ -45,6 +45,7 @@ public class Configuration {
|
||||
@Getter public String trustedRoleName = "Trusted";
|
||||
@Getter public String adminRoleName = "Admin";
|
||||
@Getter public String statusMessage = "Gay Sex";
|
||||
@Getter public String inviteLink = "https://discord.gg/xdgCkUyaA4";
|
||||
}
|
||||
|
||||
public static class EmbedColors {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package land.chipmunk.chayapak.chomens_bot.commands;
|
||||
|
||||
import land.chipmunk.chayapak.chomens_bot.Bot;
|
||||
import land.chipmunk.chayapak.chomens_bot.command.Command;
|
||||
import land.chipmunk.chayapak.chomens_bot.command.CommandContext;
|
||||
import net.kyori.adventure.text.Component;
|
||||
@@ -35,7 +36,9 @@ public class DiscordCommand implements Command {
|
||||
}
|
||||
|
||||
public Component execute(CommandContext context, String[] args, String[] fullArgs) {
|
||||
final String link = "https://discord.gg/xdgCkUyaA4";
|
||||
final Bot bot = context.bot();
|
||||
|
||||
final String link = bot.config().discord().inviteLink();
|
||||
return Component.empty()
|
||||
.append(Component.text("The Discord invite is ").color(NamedTextColor.WHITE))
|
||||
.append(
|
||||
|
||||
@@ -143,7 +143,7 @@ public class DiscordPlugin {
|
||||
)
|
||||
.color(NamedTextColor.RED);
|
||||
|
||||
final String discordUrl = "https://discord.gg/xdgCkUyaA4"; // too lazy to make a config
|
||||
final String discordUrl = config.discord().inviteLink(); // too lazy to make a config
|
||||
|
||||
final Component discordComponent = Component.empty()
|
||||
.append(Component.text("ChomeNS ").color(NamedTextColor.YELLOW))
|
||||
@@ -156,14 +156,16 @@ public class DiscordPlugin {
|
||||
.clickEvent(ClickEvent.openUrl(discordUrl));
|
||||
|
||||
final Component component = Component.translatable(
|
||||
"[%s] %s › %s%s",
|
||||
"[%s] %s › %s",
|
||||
discordComponent,
|
||||
nameComponent,
|
||||
Component.text(
|
||||
message
|
||||
.replace("\uD83D\uDC80", "☠") // mirko forced me to do it :(
|
||||
).color(NamedTextColor.GRAY),
|
||||
attachmentsComponent
|
||||
Component
|
||||
.text(
|
||||
message
|
||||
.replace("\uD83D\uDC80", "☠")
|
||||
)
|
||||
.color(NamedTextColor.GRAY)
|
||||
.append(attachmentsComponent)
|
||||
).color(NamedTextColor.DARK_GRAY);
|
||||
bot.chat().tellraw(component);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user