Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #96 from BigBotNetwork/greg-dev
Browse files Browse the repository at this point in the history
Greg dev
  • Loading branch information
greg6775 authored Nov 23, 2019
2 parents f51f470 + c0d25b7 commit a0af1a9
Show file tree
Hide file tree
Showing 14 changed files with 223 additions and 122 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/bbn/hadder/Hadder.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static void startBot() {
new GifCommand(),
new ClearCommand(),
new GitHubCommand(),
new ScreenshareCommand(),
new ScreenShareCommand(),
new RebootCommand(),
new EqualsCommand(),
new InviteCommand(),
Expand All @@ -71,6 +71,7 @@ private static void startBot() {
new RulesCommand(),
new FeedbackCommand(),
new AvatarCommand(),
new EvalCommand(),
new LinkCommand()), config, helpCommand);

builder.addEventListeners(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ public void executed(String[] args, CommandEvent event) {
}
}
} else {
event.getTextChannel().sendMessage("SOON").queue();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO, new EmbedBuilder()
.setTitle("Connect you GH account"))
.setDescription("[Please connect your GitHub account here](https://github.com/login/oauth/authorize?client_id=25321f690bb1b6952942)")
.build()).queue();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ public class InviteCommand implements Command {
@Override
public void executed(String[] args, CommandEvent event) {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO, builder).setTitle("Invite me!").setDescription("[Invite me here!](https://discordapp.com/oauth2/authorize?client_id=" + Hadder.shardManager.getGuilds().get(0).getSelfMember().getId() + "&scope=bot&permissions=470133879)").build()).queue();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO, builder)
.setTitle("Invite me!")
.setDescription("[Invite me here!](https://discordapp.com/oauth2/authorize?client_id=" + Hadder.shardManager.getGuilds().get(0).getSelfMember().getId() + "&scope=bot&permissions=470133879)")
.build()).queue();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

import java.util.List;

public class ScreenshareCommand implements Command {
public class ScreenShareCommand implements Command {

@Override
public void executed(String[] args, CommandEvent event) {
if (args.length>0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public void executed(String[] args, CommandEvent event) {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO, builder).setDescription("Successfully deleted " + nbToDelete + " messages.").build()).queue();
} catch (NumberFormatException e) {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("You have to specify a number!").build()).queue();
event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel());
}
} else {
Expand All @@ -49,8 +47,6 @@ public void executed(String[] args, CommandEvent event) {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION, builder).build()).queue();
}
} else {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("You have to specify a number!").build()).queue();
event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public void executed(String[] args, CommandEvent event) {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("The prefix must not contain **\"**").build()).queue();
}
} else {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("You have to set a prefix.").build()).queue();
event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel());
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public void executed(String[] args, CommandEvent event) {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("You can't kick yourself.").build()).queue();
}
} else if (event.getMessage().getMentionedMembers().size() == 0) {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("You have to mention at least one user!").build()).queue();
event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel());
} else if (event.getMessage().getMentionedMembers().size() > 1) {
for (int i = 0; i < event.getMessage().getMentionedMembers().size(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public void executed(String[] args, CommandEvent event) {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO, builder).setTitle("✅ Successfully nicked ✅").setDescription("I successfully nicked " + event.getMessage().getMentionedMembers().get(0).getUser().getAsTag() + ".").build()).queue();
}
} else {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setTitle("Missing arguments").setDescription("You have to specify a new nickname for the user(s).").build()).queue();
event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel());
}
} else {
Expand All @@ -51,8 +49,6 @@ public void executed(String[] args, CommandEvent event) {
}
}
} else if (event.getMessage().getMentionedMembers().size() == 0) {
EmbedBuilder builder = new EmbedBuilder();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING, builder).setDescription("You have to mention at least one user!").build()).queue();
event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel());
} else {
for (int i = 0; i < event.getMessage().getMentionedMembers().size(); i++) {
Expand Down
Loading

0 comments on commit a0af1a9

Please sign in to comment.