Skip to content

Commit 548da78

Browse files
committed
Convert Stickerify to record
1 parent af606d1 commit 548da78

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/com/github/stickerifier/stickerify/bot/Stickerify.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,12 @@
4747
*
4848
* @author Roberto Cella
4949
*/
50-
public class Stickerify {
50+
public record Stickerify(TelegramBot bot, Executor executor) {
5151

5252
private static final Logger LOGGER = LoggerFactory.getLogger(Stickerify.class);
5353
private static final String BOT_TOKEN = System.getenv("STICKERIFY_TOKEN");
5454
private static final ThreadFactory VIRTUAL_THREAD_FACTORY = Thread.ofVirtual().name("Virtual-", 0).factory();
5555

56-
private final TelegramBot bot;
57-
private final Executor executor;
58-
5956
/**
6057
* Instantiate the bot processing requests with virtual threads.
6158
*
@@ -70,7 +67,7 @@ public Stickerify() {
7067
*
7168
* @see Stickerify
7269
*/
73-
Stickerify(TelegramBot bot, Executor executor) {
70+
public Stickerify(TelegramBot bot, Executor executor) {
7471
this.bot = bot;
7572
this.executor = executor;
7673

0 commit comments

Comments
 (0)