Skip to content

Commit

Permalink
refactor: remove emojy list book types
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Dec 9, 2023
1 parent 7d3179b commit e8d6d18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 60 deletions.
43 changes: 0 additions & 43 deletions core/src/main/kotlin/com/mineinabyss/emojy/EmojyBook.kt

This file was deleted.

20 changes: 4 additions & 16 deletions core/src/main/kotlin/com/mineinabyss/emojy/EmojyCommands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,10 @@ class EmojyCommands : IdofrontCommandExecutor(), TabCompleter {
else -> emojy.gifs.joinToString(", ") { it.id }.miniMsg()
}

when (emojyConfig.emojyList.type) {
EmojyConfig.ListType.BOOK -> sender.openBook(
Book.builder().addPage(
"<green>List of emojis:<newline>".miniMsg().append(emoteList)
.append("<newline><newline><#f35444>List of gifs:<newline>".miniMsg())
.append(gifList)
).build()
)
EmojyConfig.ListType.BOOK2 -> EmojyBook.book(sender)
EmojyConfig.ListType.CHAT -> {
sender.sendRichMessage("<green>List of emojis:")
sender.sendMessage(emoteList)
sender.sendRichMessage("<#f35444>List of GIFs")
sender.sendMessage(gifList)
}
}
sender.sendRichMessage("<green>List of emojis:")
sender.sendMessage(emoteList)
sender.sendRichMessage("<#f35444>List of GIFs")
sender.sendMessage(gifList)
}
}
"reload" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ data class EmojyConfig(

@Serializable
data class EmojyList(
val type: ListType = ListType.CHAT,
val ignoredEmoteIds: Set<String> = mutableSetOf(),
val ignoredGifIds: Set<String> = mutableSetOf(),
val ignoredFonts: Set<@Serializable(KeySerializer::class) Key> = mutableSetOf()
Expand Down

0 comments on commit e8d6d18

Please sign in to comment.