Skip to content

Commit

Permalink
Change version numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaFox161 committed Jan 5, 2018
1 parent 6ffa56e commit e0065f2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.cloudcraftgaming</groupId>
<artifactId>DisCal</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cloudcraftgaming/discal/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
@SuppressWarnings("ThrowableNotThrown")
public class Main {
public static String version = "1.1.0";
public static String version = "1.2.0";
public static IDiscordClient client;

public static void main(String[] args) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1266,29 +1266,25 @@ private void moduleInfo(String[] args, MessageReceivedEvent event, GuildSettings
}

private void moduleEnable(String[] args, MessageReceivedEvent event, GuildSettings settings) {
if (settings.isDevGuild()) {
long guildId = event.getGuild().getLongID();
if (args.length == 2) {
if (AnnouncementCreator.getCreator().hasAnnouncement(guildId)) {
Message.sendMessage(MessageManager.getMessage("Announcement.Enable.Creator", settings), event);
long guildId = event.getGuild().getLongID();
if (args.length == 2) {
if (AnnouncementCreator.getCreator().hasAnnouncement(guildId)) {
Message.sendMessage(MessageManager.getMessage("Announcement.Enable.Creator", settings), event);
} else {
String value = args[1];
if (!AnnouncementUtils.announcementExists(value, event)) {
Message.sendMessage(MessageManager.getMessage("Creator.Announcement.CannotFind.Announcement", settings), event);
} else {
String value = args[1];
if (!AnnouncementUtils.announcementExists(value, event)) {
Message.sendMessage(MessageManager.getMessage("Creator.Announcement.CannotFind.Announcement", settings), event);
} else {
Announcement a = DatabaseManager.getManager().getAnnouncement(UUID.fromString(value), guildId);
a.setEnabled(!a.isEnabled());
Announcement a = DatabaseManager.getManager().getAnnouncement(UUID.fromString(value), guildId);
a.setEnabled(!a.isEnabled());

DatabaseManager.getManager().updateAnnouncement(a);
DatabaseManager.getManager().updateAnnouncement(a);

Message.sendMessage(MessageManager.getMessage("Announcement.Enable.Success", "%value%", a.isEnabled() + "", settings), event);
}
Message.sendMessage(MessageManager.getMessage("Announcement.Enable.Success", "%value%", a.isEnabled() + "", settings), event);
}
} else {
Message.sendMessage(MessageManager.getMessage("Announcement.Enable.Specify", settings), event);
}
} else {
Message.sendMessage(MessageManager.getMessage("Notification.Disabled", settings), event);
Message.sendMessage(MessageManager.getMessage("Announcement.Enable.Specify", settings), event);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,10 @@ public Boolean issueCommand(String[] args, MessageReceivedEvent event, GuildSett
}
break;
case "restart":
if (settings.isDevGuild()) {
if (PermissionChecker.hasSufficientRole(event)) {
moduleRestart(args, event, calendarData, settings);
} else {
Message.sendMessage(MessageManager.getMessage("Notification.Perm.CONTROL_ROLE", settings), event);
}
if (PermissionChecker.hasSufficientRole(event)) {
moduleRestart(args, event, calendarData, settings);
} else {
Message.sendMessage(MessageManager.getMessage("Notification.Disabled", settings), event);
Message.sendMessage(MessageManager.getMessage("Notification.Perm.CONTROL_ROLE", settings), event);
}
break;
case "cancel":
Expand Down

0 comments on commit e0065f2

Please sign in to comment.