|
34 | 34 | import java.util.EnumSet; |
35 | 35 | import java.util.List; |
36 | 36 | import java.util.Scanner; |
37 | | -import java.util.concurrent.TimeUnit; |
38 | | - |
39 | | -import it.unimi.dsi.fastutil.longs.LongSet; |
40 | 37 | import net.dv8tion.jda.api.entities.channel.ChannelType; |
41 | | -import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent; |
42 | 38 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent; |
43 | 39 | import org.mangorage.basicutils.config.Config; |
44 | 40 | import org.mangorage.basicutils.config.ConfigSetting; |
|
72 | 68 | import org.mangorage.mangobot.modules.github.IssueScanCommand; |
73 | 69 | import org.mangorage.mangobot.modules.github.PRScanCommand; |
74 | 70 | import org.mangorage.mangobot.modules.github.PasteRequestModule; |
75 | | -import org.mangorage.mangobot.modules.mappings.ClassMapCommand; |
76 | | -import org.mangorage.mangobot.modules.mappings.DefMapCommand; |
77 | | -import org.mangorage.mangobot.modules.mappings.FCICommand; |
78 | | -import org.mangorage.mangobot.modules.mappings.MCPCommand; |
79 | | -import org.mangorage.mangobot.modules.mappings.MappingsMainCommand; |
80 | | -import org.mangorage.mangobot.modules.mappings.MappingsManager; |
81 | | -import org.mangorage.mangobot.modules.mappings.VarMapCommand; |
82 | | -import org.mangorage.mangobot.modules.mappings.YCCommand; |
83 | | -import org.mangorage.mangobot.modules.mappings.YFCommand; |
84 | | -import org.mangorage.mangobot.modules.mappings.YMCommand; |
85 | 71 | import org.mangorage.mangobot.modules.music.commands.PauseCommand; |
86 | 72 | import org.mangorage.mangobot.modules.music.commands.PlayCommand; |
87 | 73 | import org.mangorage.mangobot.modules.music.commands.PlayingCommand; |
@@ -141,11 +127,9 @@ public class MangoBotPlugin extends CorePlugin { |
141 | 127 | public final static Config CONFIG = new Config(Path.of("plugins/%s/.env".formatted(MangoBotPlugin.ID))); |
142 | 128 |
|
143 | 129 | // Where we create Settings for said Config |
144 | | - public static final ISetting<String> MAPPINGS_VERSION = ConfigSetting.create(CONFIG, "MAPPINGS_VERSION", "empty"); |
145 | 130 | public static final ISetting<String> BOT_TOKEN = ConfigSetting.create(CONFIG, "BOT_TOKEN", "empty"); |
146 | 131 | public static final ISetting<String> GITHUB_TOKEN = ConfigSetting.create(CONFIG, "PASTE_TOKEN", "empty"); |
147 | 132 | public static final ISetting<String> GITHUB_USERNAME = ConfigSetting.create(CONFIG, "GITHUB_USERNAME", "RealMangoRage"); |
148 | | - public static final ISetting<String> DEEPL_TOKEN = ConfigSetting.create(CONFIG, "DEEPL_TOKEN", "empty"); |
149 | 133 | public static final ButtonActionRegistry ACTION_REGISTRY = new ButtonActionRegistry(); |
150 | 134 |
|
151 | 135 |
|
@@ -173,24 +157,6 @@ public MangoBotPlugin() { |
173 | 157 | ); |
174 | 158 |
|
175 | 159 | getJDA().addEventListener(new BotEventListener(this)); |
176 | | - getPluginBus().addGenericListener(100, GuildMemberJoinEvent.class, DiscordEvent.class, this::onUserJoin); |
177 | | - } |
178 | | - |
179 | | - public void onUserJoin(DiscordEvent<GuildMemberJoinEvent> event) { |
180 | | - var e = event.getInstance(); |
181 | | - |
182 | | - System.out.println(e.getUser().getGlobalName()); |
183 | | - System.out.println(e.getUser().getName()); |
184 | | - System.out.println(e.getUser().getEffectiveName()); |
185 | | - |
186 | | - var gn = e.getUser().getName(); |
187 | | - |
188 | | - if (gn.contains("lexlover") && e.getGuild().getIdLong() == 1129059589325852724L) { |
189 | | - e.getMember() |
190 | | - .ban(6, TimeUnit.DAYS) |
191 | | - .reason("Spam") |
192 | | - .queue(); |
193 | | - } |
194 | 160 | } |
195 | 161 |
|
196 | 162 | @Override |
@@ -256,21 +222,6 @@ public void registration() { |
256 | 222 |
|
257 | 223 | // Tricks |
258 | 224 | cmdRegistry.addBasicCommand(new TrickCommand(this)); |
259 | | - |
260 | | - |
261 | | - // Mappings |
262 | | - MappingsManager latest_mappings_manager = MappingsManager.new_(); // Soon we need to do for multiple versions but not ATM |
263 | | - latest_mappings_manager.init(MAPPINGS_VERSION); |
264 | | - cmdRegistry.addBasicCommand(new MappingsMainCommand(latest_mappings_manager,this)); |
265 | | - cmdRegistry.addBasicCommand(new ClassMapCommand(latest_mappings_manager,this)); |
266 | | - cmdRegistry.addBasicCommand(new DefMapCommand(latest_mappings_manager,this)); |
267 | | - cmdRegistry.addBasicCommand(new VarMapCommand(latest_mappings_manager,this)); |
268 | | - cmdRegistry.addBasicCommand(new MCPCommand(latest_mappings_manager,this)); |
269 | | - cmdRegistry.addBasicCommand(new FCICommand(latest_mappings_manager,this)); |
270 | | - cmdRegistry.addBasicCommand(new YCCommand(latest_mappings_manager,this)); |
271 | | - cmdRegistry.addBasicCommand(new YMCommand(latest_mappings_manager,this)); |
272 | | - cmdRegistry.addBasicCommand(new YFCommand(latest_mappings_manager,this)); |
273 | | - |
274 | 225 |
|
275 | 226 | // Test |
276 | 227 | cmdRegistry.addBasicCommand(new RunCode()); |
|
0 commit comments