Skip to content

Commit ed4473c

Browse files
committed
off-by-one error
1 parent ec07f70 commit ed4473c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ WORKDIR /app
2121
LABEL internal-port="8080"
2222

2323
LABEL arachne.name="Ninetales Discord Bot"
24-
LABEL arachne.version="1.2.0"
24+
LABEL arachne.version="1.2.1"
2525

26-
LABEL ninetales.update-note="Reversed discord system and bot roles in boost and join messages"
26+
LABEL ninetales.update-note="Fixed off-by-one error"
2727

2828
# Copy the built JAR from build stage
2929
COPY --from=build /app/target/*.jar ./app.jar

src/main/java/ws/mia/ninetales/discord/misc/MemberJoinListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@Component
1616
public class MemberJoinListener extends ListenerAdapter {
1717

18-
private static final String[] JOIN_SUFFIXES = {":3", "owo", "uwu", "meow", "^w^", ">w<"};
18+
private static final String[] JOIN_SUFFIXES = {":3", "owo", "uwu", "meow", "^w^", ">w<", "mrow"};
1919

2020
private final EnvironmentService environmentService;
2121

@@ -29,7 +29,7 @@ public void onGuildMemberJoin(@NonNull GuildMemberJoinEvent event) {
2929
if (environmentService.getMemberJoinMessageChannelId() == null) return;
3030
TextChannel announceChannel = event.getGuild().getTextChannelById(environmentService.getMemberJoinMessageChannelId());
3131
if(announceChannel != null) {
32-
announceChannel.sendMessage("<@%s> joined ".formatted(event.getUser().getIdLong()) + JOIN_SUFFIXES[new Random().nextInt(JOIN_SUFFIXES.length-1)]).queue();
32+
announceChannel.sendMessage("<@%s> joined ".formatted(event.getUser().getIdLong()) + JOIN_SUFFIXES[new Random().nextInt(JOIN_SUFFIXES.length)]).queue();
3333
}
3434
}
3535
}

src/main/java/ws/mia/ninetales/hypixel/RemoteHypixelAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public String getDiscord(UUID uuid) {
5353
log.warn("Interrupted while attempting to get discord from Hypixel for {}", uuid, e);
5454
return null;
5555
} catch (NullPointerException e) {
56-
return null; // object mapper can't read, probably means player just doesn't doesn't have hypixel data.
56+
return null; // object mapper can't read, probably means player just doesn't have hypixel data.
5757
}
5858
}
5959

0 commit comments

Comments
 (0)