diff --git a/.DS_Store b/.DS_Store index fb66f54..d828d7a 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/pom.xml b/pom.xml index 19e81c6..c4be9bb 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,16 @@ https://jitpack.io + m2-chew-releases + Maven Chewtral + https://m2.chew.pro/releases + + + csarcane + CS Arcane + https://dl.cloudsmith.io/public/arcane/archive/maven + + jcenter jcenter-bintray https://jcenter.bintray.com @@ -37,10 +47,10 @@ pom - com.jagrosh - EasySQL - 0.3 - + com.github.jagrosh + easysql + d72d4394a5 + club.minnced discord-webhooks diff --git a/src/.DS_Store b/src/.DS_Store index 8ea6517..b57e527 100644 --- a/src/.DS_Store +++ b/src/.DS_Store Binary files differ diff --git a/src/main/java/com/jagrosh/vortex/Vortex.java b/src/main/java/com/jagrosh/vortex/Vortex.java index 7c6d2d2..ddb9f5d 100644 --- a/src/main/java/com/jagrosh/vortex/Vortex.java +++ b/src/main/java/com/jagrosh/vortex/Vortex.java @@ -18,6 +18,7 @@ import club.minnced.discord.webhook.WebhookClient; import club.minnced.discord.webhook.WebhookClientBuilder; import com.jagrosh.vortex.commands.tools.LookupCmd; +import com.jagrosh.vortex.commands.general.AirstrikeCmd; import com.jagrosh.vortex.commands.automod.*; import com.jagrosh.vortex.commands.general.*; import com.jagrosh.vortex.commands.moderation.*; @@ -115,6 +116,15 @@ new ServerinfoCmd(), new UserinfoCmd(), + // andrea commands + new AirstrikeCmd(), + new FuckCmd(), + new AssassinateCmd(), + new BombCmd(), + new MolestCmd(), + new TouchCmd(), + new FillCmd(), + // Moderation new KickCmd(this), new BanCmd(this), diff --git a/src/main/java/com/jagrosh/vortex/commands/general/AirstrikeCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/AirstrikeCmd.java new file mode 100644 index 0000000..adaa772 --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/AirstrikeCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class AirstrikeCmd extends Command +{ + public AirstrikeCmd() + { + this.name = "airstrike"; + this.help = "airstrike a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to airstrike!"); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(Constants.VORTEX_EMOJI + " **Airstrike** " + Constants.VORTEX_EMOJI) + .setEmbed(new EmbedBuilder() + .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + .setDescription(target.getAsMention() + " has been airstriked.") + .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/general/AssassinateCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/AssassinateCmd.java new file mode 100644 index 0000000..72f9b93 --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/AssassinateCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class AssassinateCmd extends Command +{ + public AssassinateCmd() + { + this.name = "assassinate"; + this.help = "Assassinate a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to assassinate!"); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(Constants.VORTEX_EMOJI + " **Donald Trump Moment** " + Constants.VORTEX_EMOJI) + .setEmbed(new EmbedBuilder() + .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + .setDescription(target.getAsMention() + " was assassinated. :gun:") + .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/general/BombCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/BombCmd.java new file mode 100644 index 0000000..c9583d9 --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/BombCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class BombCmd extends Command +{ + public BombCmd() + { + this.name = "bomb"; + this.help = "Bomb a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to bomb!"); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(Constants.VORTEX_EMOJI + " **Bomb** " + Constants.VORTEX_EMOJI) + .setEmbed(new EmbedBuilder() + .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + .setDescription(target.getAsMention() + " was bombed. :bomb:") + .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/general/FillCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/FillCmd.java new file mode 100644 index 0000000..e7ce55b --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/FillCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class FillCmd extends Command +{ + public FillCmd() + { + this.name = "fill"; + this.help = "fill a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to fill."); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(target.getAsMention() + " was filled with love!") + // .setEmbed(new EmbedBuilder() + // .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + // .setDescription(target.getAsMention() + " was filled. :blush:") + // .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/general/FuckCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/FuckCmd.java new file mode 100644 index 0000000..048c745 --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/FuckCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class FuckCmd extends Command +{ + public FuckCmd() + { + this.name = "fuck"; + this.help = "fuck a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to... well... y'know."); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(target.getAsMention() + " was, uhh... :flushed:, yk.") + // .setEmbed(new EmbedBuilder() + // .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + // .setDescription(target.getAsMention() + " was fucked. :blush:") + // .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/general/MolestCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/MolestCmd.java new file mode 100644 index 0000000..752ed5f --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/MolestCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class MolestCmd extends Command +{ + public MolestCmd() + { + this.name = "molest"; + this.help = "molest a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to molest!"); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(target.getAsMention() + " has been molested. Yummy! :yum:") + // .setEmbed(new EmbedBuilder() + // .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + // .setDescription(target.getAsMention() + " has been molested. Yummy! :yummy:") + // .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/general/TouchCmd.java b/src/main/java/com/jagrosh/vortex/commands/general/TouchCmd.java new file mode 100644 index 0000000..224737f --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/general/TouchCmd.java @@ -0,0 +1,70 @@ +/* + * Copyright 2018 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.general; + +import com.jagrosh.jdautilities.command.Command; +import com.jagrosh.jdautilities.command.CommandEvent; +import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo; +import com.jagrosh.vortex.Constants; +import com.jagrosh.vortex.utils.FormatUtil; +import java.awt.Color; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDAInfo; +import net.dv8tion.jda.api.MessageBuilder; +import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.sharding.ShardManager; +import net.dv8tion.jda.api.entities.User; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class TouchCmd extends Command +{ + public TouchCmd() + { + this.name = "touch"; + this.help = "touch a user"; + this.guildOnly = false; + this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; + } + + @Override + protected void execute(CommandEvent event) + { + if (event.getArgs().isEmpty()) { + event.replyError("Please mention a user to touch!"); + return; + } + + // Try to resolve a user from args + User target = event.getMessage().getMentionedUsers().stream().findFirst().orElse(null); + if (target == null) { + event.replyError("Could not find a mentioned user!"); + return; + } + + // Build the response + event.reply(new MessageBuilder() + .setContent(target.getAsMention() + "has been touched. mmmmm, :yum:") + // .setEmbed(new EmbedBuilder() + // .setColor(!event.isFromType(ChannelType.TEXT) ? Color.GRAY : event.getSelfMember().getColor()) + // .setDescription(target.getAsMention() + " has been touching. mmmmmm :yummy:") + // .build()) + .build()); + } +} diff --git a/src/main/java/com/jagrosh/vortex/commands/moderation/StrikeCmd.java b/src/main/java/com/jagrosh/vortex/commands/moderation/StrikeCmd.java index 27076de..c56da92 100644 --- a/src/main/java/com/jagrosh/vortex/commands/moderation/StrikeCmd.java +++ b/src/main/java/com/jagrosh/vortex/commands/moderation/StrikeCmd.java @@ -28,6 +28,7 @@ import net.dv8tion.jda.api.entities.Role; import net.dv8tion.jda.api.entities.User; + /** * * @author John Grosh (john.a.grosh@gmail.com)