diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/AbstractCommand.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/AbstractCommand.java
index f4438a884be2a5e3dc33b2455d622e1fa9bb8cd6..d53eeb37933ffdbdd355966c6c04b29f0b476072 100644
--- a/src/main/java/com/l2jserver/datapack/custom/service/discord/AbstractCommand.java
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/AbstractCommand.java
@@ -18,10 +18,15 @@
  */
 package com.l2jserver.datapack.custom.service.discord;
 
+import net.dv8tion.jda.api.EmbedBuilder;
 import net.dv8tion.jda.api.entities.ChannelType;
+import net.dv8tion.jda.api.entities.Guild;
+import net.dv8tion.jda.api.entities.Member;
+import net.dv8tion.jda.api.entities.Role;
 import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
 import net.dv8tion.jda.api.hooks.ListenerAdapter;
 
+import java.awt.Color;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -34,9 +39,9 @@ import static com.l2jserver.gameserver.config.Configuration.discord;
  */
 public abstract class AbstractCommand extends ListenerAdapter {
 	
-	public abstract List<String> getCommands();
+	public abstract String[] getCommands();
 	
-	public abstract void executeCommand(MessageReceivedEvent event, String[] args, String prefix);
+	public abstract void executeCommand(MessageReceivedEvent event, String[] args);
 	
 	@Override
 	public void onMessageReceived(MessageReceivedEvent event) {
@@ -45,7 +50,7 @@ public abstract class AbstractCommand extends ListenerAdapter {
 		}
 		String[] args = event.getMessage().getContentRaw().split(" ");
 		if (isCommand(args, discord().getPrefix())) {
-			executeCommand(event, args, discord().getPrefix());
+			executeCommand(event, args);
 		}
 	}
 	
@@ -56,5 +61,20 @@ public abstract class AbstractCommand extends ListenerAdapter {
 		}
 		return commands.contains(args[0]);
 	}
-	
+
+	public static boolean canExecute(MessageReceivedEvent event) {
+		EmbedBuilder eb = new EmbedBuilder().setColor(Color.RED);
+		Guild guild = event.getJDA().getGuildById(discord().getServerId());
+		Member guildMember = guild != null ? guild.getMember(event.getMessage().getAuthor()) : null;
+		Role gameMaster = guild != null ? guild.getRoleById(discord().getGameMasterId())  : null;
+
+		// Only Server owner and members with the specified role assigned can execute the command.
+		if ((guildMember == null) || (gameMaster == null) || !guildMember.isOwner() || !guildMember.getRoles().contains(gameMaster)) {
+			eb.setDescription("Only Staff members can use this command!");
+			event.getTextChannel().sendMessage(eb.build()).queue();
+			event.getMessage().addReaction("\u274C").queue();
+			return false;
+		}
+		return true;
+	}
 }
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/DiscordBot.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/DiscordBot.java
index 4e8e92c186534dd80cefd7fc96c23f1b30c293ec..b2e45ab2c5d6d6c6a93b38722b98b84607d0c624 100644
--- a/src/main/java/com/l2jserver/datapack/custom/service/discord/DiscordBot.java
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/DiscordBot.java
@@ -18,16 +18,13 @@
  */
 package com.l2jserver.datapack.custom.service.discord;
 
-import static com.l2jserver.gameserver.config.Configuration.discord;
-
-import java.awt.Color;
-
-import javax.security.auth.login.LoginException;
-
-import com.l2jserver.datapack.custom.service.discord.commands.OnlineCommand;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
+import com.l2jserver.datapack.custom.service.discord.commands.*;
+import com.l2jserver.datapack.custom.service.discord.commands.moderation.AbortCommand;
+import com.l2jserver.datapack.custom.service.discord.commands.moderation.AnnounceCommand;
+import com.l2jserver.datapack.custom.service.discord.commands.moderation.RestartCommand;
+import com.l2jserver.datapack.custom.service.discord.commands.moderation.ShutdownCommand;
+import com.l2jserver.datapack.custom.service.discord.listeners.ChatListener;
+import com.l2jserver.datapack.custom.service.discord.listeners.BasicListener;
 import net.dv8tion.jda.api.EmbedBuilder;
 import net.dv8tion.jda.api.JDA;
 import net.dv8tion.jda.api.JDABuilder;
@@ -37,6 +34,13 @@ import net.dv8tion.jda.api.entities.MessageChannel;
 import net.dv8tion.jda.api.requests.GatewayIntent;
 import net.dv8tion.jda.api.utils.ChunkingFilter;
 import net.dv8tion.jda.api.utils.MemberCachePolicy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.security.auth.login.LoginException;
+import java.awt.Color;
+
+import static com.l2jserver.gameserver.config.Configuration.discord;
 
 /**
  * Main class of Discord Bot.
@@ -50,8 +54,13 @@ public class DiscordBot {
 	private static JDA jda;
 	
 	private static final Object[] COMMANDS = {
-		new StartListener(),
+		new AbortCommand(),
+		new AnnounceCommand(),
 		new OnlineCommand(),
+		new RestartCommand(),
+		new ShutdownCommand(),
+		new ChatListener(),
+		new BasicListener(),
 	};
 	
 	public static void main(String[] args) {
@@ -91,7 +100,7 @@ public class DiscordBot {
 	 * @param ed the embed message to send. (The embed build(); is done here.)
 	 * @param channelId the channel to send the embed. // planned to be used by console logs
 	 */
-	public void sendMessageTo(EmbedBuilder ed, String channelId) {
+	public static void sendMessageTo(EmbedBuilder ed, String channelId) {
 		MessageChannel channel = jda.getTextChannelById(channelId);
 		if (channel != null) {
 			channel.sendMessage(ed.build()).queue(); // this actually sends the information to discord.
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/OnlineCommand.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/OnlineCommand.java
index bdc2884deaf56cecf4d561091433f0b41261aefb..a22f6d47f11b040e3b3a726193351fff65724a98 100644
--- a/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/OnlineCommand.java
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/OnlineCommand.java
@@ -25,8 +25,6 @@ import net.dv8tion.jda.api.EmbedBuilder;
 import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
 
 import java.awt.Color;
-import java.util.ArrayList;
-import java.util.List;
 
 /**
  * Online Command.
@@ -34,33 +32,38 @@ import java.util.List;
  * @version 2.6.2.0
  */
 public class OnlineCommand extends AbstractCommand {
-	
+
+	private static final String[] COMMANDS = {
+		"online",
+		"on"
+	};
+
 	@Override
-	public List<String> getCommands() {
-		List<String> commands = new ArrayList<>();
-		commands.add("online");
-		commands.add("on");
-		return commands;
+	public String[] getCommands() {
+		return COMMANDS;
 	}
-	
+
 	@Override
-	public void executeCommand(MessageReceivedEvent event, String[] args, String prefix) {
-		
-		if (args.length > 1) {
-			event.getTextChannel().sendMessage(new EmbedBuilder().setColor(Color.RED).setDescription("Please  use the command without any Arguments").build()).queue();
+	public void executeCommand(MessageReceivedEvent event, String[] args) {
+		EmbedBuilder eb = new EmbedBuilder();
+		final int playersCount = L2World.getInstance().getAllPlayersCount();
+		final int gmCount = AdminData.getInstance().getAllGms(true).size();
+		if (args.length != 1) {
+			eb.setColor(Color.RED);
+			eb.setDescription("Please use the command without any Arguments");
+			event.getTextChannel().sendMessage(eb.build()).queue();
 			event.getMessage().addReaction("\u274C").queue(); // Bot reacts with X mark.
 			return;
 		}
-		event.getMessage().addReaction("\u2705").queue(); // Bot reacts with check mark.
-		final int playersCount = L2World.getInstance().getAllPlayersCount();
-		final int gmCount = AdminData.getInstance().getAllGms(true).size();
+		
 		// A command that the bot listens to and responds in an embed with online players and Gms
-		EmbedBuilder eb = new EmbedBuilder().setColor(Color.CYAN);
+		eb.setColor(Color.CYAN);
 		eb.setTitle(event.getAuthor().getName(), event.getAuthor().getEffectiveAvatarUrl());
 		eb.setDescription("***___GAME INFO___***");
 		eb.addField("Online Players", String.valueOf(playersCount), false);
 		eb.addBlankField(false);
 		eb.addField("Online GM's", String.valueOf(gmCount), false);
 		event.getChannel().sendMessage(eb.build()).queue(); // this actually sends the information to discord.
+		event.getMessage().addReaction("\u2705").queue(); // Bot reacts with check mark.
 	}
 }
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/AbortCommand.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/AbortCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..d9afed82f2281cb776ca185f85427a2d840d5dae
--- /dev/null
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/AbortCommand.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright © 2004-2021 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.datapack.custom.service.discord.commands.moderation;
+
+import com.l2jserver.datapack.custom.service.discord.AbstractCommand;
+import com.l2jserver.gameserver.Shutdown;
+import net.dv8tion.jda.api.EmbedBuilder;
+import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
+
+import java.awt.Color;
+
+import static com.l2jserver.gameserver.config.Configuration.discord;
+
+/**
+ * Abort Command.
+ * @author Stalitsa
+ * @version 2.6.2.0
+ */
+public class AbortCommand extends AbstractCommand {
+
+    private static final String[] COMMANDS = {
+        "abort",
+        "abt"
+    };
+
+    @Override
+    public String[] getCommands() {
+        return COMMANDS;
+    }
+    
+    @Override
+    public void executeCommand(MessageReceivedEvent event, String[] args) {
+        EmbedBuilder eb = new EmbedBuilder().setColor(Color.RED);
+
+        if (!canExecute(event)) {
+            return;
+        }
+
+        if (args.length != 1) {
+            eb.setDescription("Please use the command without any Arguments");
+            event.getTextChannel().sendMessage(eb.build()).queue();
+            event.getMessage().addReaction("\u274C").queue();
+            return;
+        }
+        
+        String gmName = event.getAuthor().getAsMention();
+        String commandName = args[0].substring(discord().getPrefix().length()).toUpperCase();
+        Shutdown.getInstance().telnetAbort(event.getAuthor().getName()); //Using telnet method.
+        eb.setDescription("GM: {" + gmName + "} issued command. **" + commandName + "** --- Shutdown/Restart Aborted.");
+        event.getChannel().sendMessage(eb.build()).queue();
+        event.getMessage().addReaction("\u2705").queue();
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/AnnounceCommand.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/AnnounceCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..f32930813c6a2eff83578f84abab89f446165265
--- /dev/null
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/AnnounceCommand.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright © 2004-2021 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.datapack.custom.service.discord.commands.moderation;
+
+import com.l2jserver.datapack.custom.service.discord.AbstractCommand;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+import com.l2jserver.gameserver.util.Broadcast;
+import net.dv8tion.jda.api.EmbedBuilder;
+import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
+
+import java.awt.Color;
+
+/**
+ * Announce Command.
+ * @author Stalitsa
+ * @version 2.6.2.0
+ */
+public class AnnounceCommand extends AbstractCommand {
+
+	private static final String[] COMMANDS = {
+		"announce",
+		"ann"
+	};
+
+	@Override
+	public String[] getCommands() {
+		return COMMANDS;
+	}
+
+	@Override
+	public void executeCommand(MessageReceivedEvent event, String[] args) {
+		EmbedBuilder eb = new EmbedBuilder().setColor(Color.RED);
+		String announcement = event.getMessage().getContentRaw().replace(args[0] +" "+ args[1], "");
+
+		if (!canExecute(event)) {
+			return;
+		}
+
+		if (args.length <= 2) {
+			eb.setDescription("Wrong Arguments. Please type the message to be sent.");
+			event.getTextChannel().sendMessage(eb.build()).queue();
+			event.getMessage().addReaction("\u274C").queue();
+			return;
+		}
+
+		if (args[1].equals("normal")) {
+			Broadcast.toAllOnlinePlayers(announcement);
+		}
+		
+		if (args[1].equals("critical")) {
+			Broadcast.toAllOnlinePlayers(announcement, true);
+		}
+		
+		if (args[1].equals("screen")) {
+			ExShowScreenMessage screenMessage = new ExShowScreenMessage(announcement, 20000);
+			Broadcast.toAllOnlinePlayers(screenMessage);
+		}
+		eb.setDescription("**In game Announcement have been sent**.");
+		event.getMessage().addReaction("\u2705").queue();
+		event.getChannel().sendMessage(eb.build()).queue();
+	}
+}
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/RestartCommand.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/RestartCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..c1bdc7e5bb4d036e17fd5421490f8a3c017ae8bb
--- /dev/null
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/RestartCommand.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright © 2004-2021 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.datapack.custom.service.discord.commands.moderation;
+
+import com.l2jserver.datapack.custom.service.discord.AbstractCommand;
+import com.l2jserver.gameserver.Shutdown;
+import net.dv8tion.jda.api.EmbedBuilder;
+import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
+
+import java.awt.Color;
+
+import static com.l2jserver.gameserver.config.Configuration.discord;
+
+/**
+ * Restart Command.
+ * @author Stalitsa
+ * @version 2.6.2.0
+ */
+public class RestartCommand extends AbstractCommand {
+
+	private static final String[] COMMANDS = {
+		"restart",
+		"rr"
+	};
+
+	@Override
+	public String[] getCommands() {
+		return COMMANDS;
+	}
+	
+	@Override
+	public void executeCommand(MessageReceivedEvent event, String[] args) {
+		EmbedBuilder eb = new EmbedBuilder().setColor(Color.RED);
+
+		if (!canExecute(event)) {
+			return;
+		}
+
+		if (args.length != 2) {
+			eb.setDescription("Wrong Arguments. Please just provide a number in seconds.");
+			event.getTextChannel().sendMessage(eb.build()).queue();
+			event.getMessage().addReaction("\u274C").queue();
+			return;
+		}
+
+		int seconds;
+		try {
+			seconds = Integer.parseInt(args[1]);
+		} catch (NumberFormatException e) {
+			eb.setDescription("Wrong Arguments. Please just provide a number in seconds.");
+			event.getChannel().sendMessage(eb.build()).queue();
+			event.getMessage().addReaction("\u274C").queue();
+			return;
+		}
+
+		String gmName = event.getAuthor().getAsMention();
+		String commandName = args[0].substring(discord().getPrefix().length()).toUpperCase();
+		Shutdown.getInstance().startTelnetShutdown(event.getAuthor().getName(), seconds, true); //Using telnet method.
+		eb.setColor(Color.GREEN);
+		eb.setDescription("GM: {" + gmName + "} issued command. **" + commandName + "** in " + seconds + " " + "seconds!");
+		event.getChannel().sendMessage(eb.build()).queue();
+		event.getMessage().addReaction("\u2705").queue();
+	}
+}
\ No newline at end of file
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/ShutdownCommand.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/ShutdownCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..d84c64cdb55df5ef2b2ceb74d1fb94d48c1be2ed
--- /dev/null
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/commands/moderation/ShutdownCommand.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright © 2004-2021 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.datapack.custom.service.discord.commands.moderation;
+
+import com.l2jserver.datapack.custom.service.discord.AbstractCommand;
+import com.l2jserver.gameserver.Shutdown;
+import net.dv8tion.jda.api.EmbedBuilder;
+import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
+
+import java.awt.Color;
+
+import static com.l2jserver.gameserver.config.Configuration.discord;
+
+/**
+ * Shutdown Command.
+ * @author Stalitsa
+ * @version 2.6.2.0
+ */
+public class ShutdownCommand extends AbstractCommand {
+
+	private static final String[] COMMANDS = {
+		"shutdown",
+		"sdn"
+	};
+
+	@Override
+	public String[] getCommands() {
+		return COMMANDS;
+	}
+
+	@Override
+	public void executeCommand(MessageReceivedEvent event, String[] args) {
+		EmbedBuilder eb = new EmbedBuilder();
+
+		if (!canExecute(event)) {
+			return;
+		}
+		
+		if (args.length != 2) {
+			eb.setColor(Color.RED);
+			eb.setDescription("Wrong Arguments. Please just provide a number in seconds.");
+			event.getTextChannel().sendMessage(eb.build()).queue();
+			event.getMessage().addReaction("\u274C").queue();
+			return;
+		}
+		
+		int seconds;
+		try {
+			seconds = Integer.parseInt(args[1]);
+		} catch (NumberFormatException e) {
+			eb.setColor(Color.RED);
+			eb.setDescription("Wrong Arguments. Please just provide a number in seconds.");
+			event.getChannel().sendMessage(eb.build()).queue();
+			event.getMessage().addReaction("\u274C").queue();
+			return;
+		}
+		
+		String gmName = event.getAuthor().getAsMention();
+		String commandName = args[0].substring(discord().getPrefix().length()).toUpperCase();
+		Shutdown.getInstance().startTelnetShutdown(event.getAuthor().getName(), seconds, false); //Using telnet method.
+		eb.setColor(Color.GREEN);
+		eb.setDescription("GM: {" + gmName + "} issued command. **" + commandName + "** in " + args[1] + " " + "seconds!");
+		event.getChannel().sendMessage(eb.build()).queue();
+		event.getMessage().addReaction("\u2705").queue();
+	}
+}
\ No newline at end of file
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/StartListener.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/listeners/BasicListener.java
similarity index 90%
rename from src/main/java/com/l2jserver/datapack/custom/service/discord/StartListener.java
rename to src/main/java/com/l2jserver/datapack/custom/service/discord/listeners/BasicListener.java
index 103e069b40397873a53e17d5be6bb7ba5227d0e1..bc7dbd43c1d33ae54e11a6858a84d4118f62f328 100644
--- a/src/main/java/com/l2jserver/datapack/custom/service/discord/StartListener.java
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/listeners/BasicListener.java
@@ -16,8 +16,9 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-package com.l2jserver.datapack.custom.service.discord;
+package com.l2jserver.datapack.custom.service.discord.listeners;
 
+import com.l2jserver.datapack.custom.service.discord.DiscordBot;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,7 +32,7 @@ import net.dv8tion.jda.api.hooks.ListenerAdapter;
  * @author Stalitsa
  * @version 2.6.2.0
  */
-public class StartListener extends ListenerAdapter {
+public class BasicListener extends ListenerAdapter {
 	private static final Logger LOG = LoggerFactory.getLogger(DiscordBot.class);
 	
 	@Override
diff --git a/src/main/java/com/l2jserver/datapack/custom/service/discord/listeners/ChatListener.java b/src/main/java/com/l2jserver/datapack/custom/service/discord/listeners/ChatListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..9924e619783d921b3a75a4b6697e687bbd2d2437
--- /dev/null
+++ b/src/main/java/com/l2jserver/datapack/custom/service/discord/listeners/ChatListener.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright © 2004-2021 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.datapack.custom.service.discord.listeners;
+
+import com.l2jserver.datapack.custom.service.discord.DiscordBot;
+import com.l2jserver.gameserver.model.events.Containers;
+import com.l2jserver.gameserver.model.events.EventType;
+import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerChat;
+import com.l2jserver.gameserver.model.events.listeners.ConsumerEventListener;
+import net.dv8tion.jda.api.EmbedBuilder;
+import net.dv8tion.jda.api.hooks.ListenerAdapter;
+
+import java.awt.Color;
+
+import static com.l2jserver.gameserver.config.Configuration.discord;
+
+/**
+ * Chat Listener
+ * @author Stalitsa
+ * @version 2.6.2.0
+ */
+public class ChatListener extends ListenerAdapter {
+    
+    public ChatListener() {
+        Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_CHAT, (OnPlayerChat event) -> {
+            EmbedBuilder eb = new EmbedBuilder();
+            String type = switch (event.getChatType()) {
+                case 1 -> "Shout";
+                case 8 -> "Trade";
+                case 17 -> "Hero";
+                default -> null;
+            };
+            if (type != null) {
+                eb.setColor(Color.CYAN);
+                eb.setTitle("***___" + event.getActiveChar().getName() + "___***");
+                eb.setDescription("**" + type + ":** \n ``" + event.getText() + "``");
+                DiscordBot.sendMessageTo(eb, discord().getGameChatChannelId());
+            }
+        }, this));
+    }
+}