Skip to content

Commit 605cff6

Browse files
committed
Changed path once again;
Changed buttonfy method to buttonize;
1 parent 20b20a7 commit 605cff6

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6-
<groupId>com.kuuhaku</groupId>
6+
<groupId>com.github.ygimenez</groupId>
77
<artifactId>PaginationUtils</artifactId>
8-
<version>1.0.0b</version>
8+
<version>1.0.1</version>
99
<packaging>jar</packaging>
1010

1111
<name>Pagination Utils</name>

src/main/java/com/kuuhaku/exception/EmptyPageCollectionException.java renamed to src/main/java/com/github/ygimenez/exception/EmptyPageCollectionException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kuuhaku.exception;
1+
package com.github.ygimenez.exception;
22

33
public class EmptyPageCollectionException extends RuntimeException {
44
public EmptyPageCollectionException() {

src/main/java/com/kuuhaku/listener/MessageListener.java renamed to src/main/java/com/github/ygimenez/listener/MessageListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kuuhaku.listener;
1+
package com.github.ygimenez.listener;
22

33
import net.dv8tion.jda.api.events.message.MessageDeleteEvent;
44
import net.dv8tion.jda.api.events.message.react.GenericMessageReactionEvent;

src/main/java/com/kuuhaku/method/Pages.java renamed to src/main/java/com/github/ygimenez/method/Pages.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package com.kuuhaku.method;
1+
package com.github.ygimenez.method;
22

3-
import com.kuuhaku.exception.EmptyPageCollectionException;
4-
import com.kuuhaku.type.PageType;
5-
import com.kuuhaku.listener.MessageListener;
6-
import com.kuuhaku.model.Page;
3+
import com.github.ygimenez.exception.EmptyPageCollectionException;
4+
import com.github.ygimenez.type.PageType;
5+
import com.github.ygimenez.listener.MessageListener;
6+
import com.github.ygimenez.model.Page;
77
import net.dv8tion.jda.api.JDA;
88
import net.dv8tion.jda.api.entities.Member;
99
import net.dv8tion.jda.api.entities.Message;
@@ -21,7 +21,7 @@
2121
import java.util.function.BiConsumer;
2222
import java.util.function.Consumer;
2323

24-
import static com.kuuhaku.type.Emote.*;
24+
import static com.github.ygimenez.type.Emote.*;
2525

2626
public class Pages {
2727

@@ -94,7 +94,7 @@ public void onMessageDelete(@Nonnull MessageDeleteEvent event) {
9494
/**
9595
* Adds menu-like buttons to the specified Message/MessageEmbed which will
9696
* browse through a given Map of pages. You may specify one Page per button,
97-
* adding another button with an existing unicode will ovewrite the current
97+
* adding another button with an existing unicode will overwrite the current
9898
* button's Page. You must specify how long the listener will stay active before
9999
* shutting down itself after a no-activity interval.
100100
*
@@ -151,19 +151,19 @@ public void onMessageDelete(@Nonnull MessageDeleteEvent event) {
151151
/**
152152
* Adds buttons to the specified Message/MessageEmbed, with each executing a
153153
* specific task on click. Each button's unicode must be unique, adding another
154-
* button with an existing unicode will ovewrite the current button's Runnable.
154+
* button with an existing unicode will overwrite the current button's Runnable.
155155
*
156156
* @param api The bot's instantiated object.
157157
* @param msg The message sent which will be buttoned.
158-
* @param buttons The bottons to be shown. The buttons are defined by a Map
158+
* @param buttons The buttons to be shown. The buttons are defined by a Map
159159
* containing emote unicodes as keys and BiConsumer<Member, Message> containing
160160
* desired behavior as value.
161161
* @param showCancelButton Should the cancel button be created automatically?
162162
* @throws ErrorResponseException Thrown if the message no longer exists or
163163
* cannot be acessed when triggering a
164164
* GenericMessageReactionEvent
165165
*/
166-
public static void buttonfy(JDA api, Message msg, Map<String, BiConsumer<Member, Message>> buttons, boolean showCancelButton) throws ErrorResponseException {
166+
public static void buttonize(JDA api, Message msg, Map<String, BiConsumer<Member, Message>> buttons, boolean showCancelButton) throws ErrorResponseException {
167167
buttons.keySet().forEach(k -> msg.addReaction(k).queue());
168168
if (!buttons.containsKey(CANCEL.getCode()) && showCancelButton) msg.addReaction(CANCEL.getCode()).queue();
169169
api.addEventListener(new MessageListener() {
@@ -196,13 +196,13 @@ public void onMessageDelete(@Nonnull MessageDeleteEvent event) {
196196
/**
197197
* Adds buttons to the specified Message/MessageEmbed, with each executing a
198198
* specific task on click. Each button's unicode must be unique, adding another
199-
* button with an existing unicode will ovewrite the current button's Runnable.
199+
* button with an existing unicode will overwrite the current button's Runnable.
200200
* You can specify the time in which the listener will automatically stop itself
201201
* after a no-activity interval.
202202
*
203203
* @param api The bot's instantiated object.
204204
* @param msg The message sent which will be buttoned.
205-
* @param buttons The bottons to be shown. The buttons are defined by a Map
205+
* @param buttons The buttons to be shown. The buttons are defined by a Map
206206
* containing emote unicodes as keys and BiConsumer<Member, Message> containing
207207
* desired behavior as value.
208208
* @param showCancelButton Should the cancel button be created automatically?
@@ -213,7 +213,7 @@ public void onMessageDelete(@Nonnull MessageDeleteEvent event) {
213213
* cannot be acessed when triggering a
214214
* GenericMessageReactionEvent
215215
*/
216-
public static void buttonfy(JDA api, Message msg, Map<String, BiConsumer<Member, Message>> buttons, boolean showCancelButton, int time, TimeUnit unit)
216+
public static void buttonize(JDA api, Message msg, Map<String, BiConsumer<Member, Message>> buttons, boolean showCancelButton, int time, TimeUnit unit)
217217
throws ErrorResponseException {
218218
buttons.keySet().forEach(k -> msg.addReaction(k).queue());
219219
if (!buttons.containsKey(CANCEL.getCode()) && showCancelButton) msg.addReaction(CANCEL.getCode()).queue();

src/main/java/com/kuuhaku/model/Page.java renamed to src/main/java/com/github/ygimenez/model/Page.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package com.kuuhaku.model;
1+
package com.github.ygimenez.model;
22

3-
import com.kuuhaku.type.PageType;
3+
import com.github.ygimenez.type.PageType;
44
import net.dv8tion.jda.api.entities.Message;
55
import net.dv8tion.jda.api.entities.MessageEmbed;
66

src/main/java/com/kuuhaku/type/Emote.java renamed to src/main/java/com/github/ygimenez/type/Emote.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kuuhaku.type;
1+
package com.github.ygimenez.type;
22

33
public enum Emote {
44
NEXT("\u25B6"), PREVIOUS("\u25C0"), ACCEPT("\u2705"), CANCEL("\u274E");

src/main/java/com/kuuhaku/type/PageType.java renamed to src/main/java/com/github/ygimenez/type/PageType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kuuhaku.type;
1+
package com.github.ygimenez.type;
22

33
public enum PageType {
44
TEXT, EMBED

0 commit comments

Comments
 (0)