|
19 | 19 | import discord4j.core.object.component.Button; |
20 | 20 | import discord4j.core.object.component.SelectMenu; |
21 | 21 | import discord4j.core.object.component.TextInput; |
| 22 | +import discord4j.core.object.emoji.Emoji; |
22 | 23 | import discord4j.core.object.entity.Message; |
23 | 24 | import discord4j.core.object.entity.User; |
24 | 25 | import discord4j.core.object.entity.channel.GuildMessageChannel; |
25 | | -import discord4j.core.object.reaction.ReactionEmoji; |
26 | 26 | import discord4j.core.spec.EmbedCreateFields; |
27 | 27 | import discord4j.core.spec.EmbedCreateSpec; |
28 | 28 | import discord4j.core.spec.InteractionPresentModalSpec; |
@@ -139,28 +139,28 @@ private Mono<Void> runSelection(ChatInputInteractionEvent event, Translator i18n |
139 | 139 | SelectMenu selectMenu = SelectMenu.of(SELECTION_ID, |
140 | 140 | SelectMenu.Option.of(i18n.apply("command.message.selection.message.name"), SELECT_MESSAGE) |
141 | 141 | .withDescription(i18n.apply("command.message.selection.message.desc")) |
142 | | - .withEmoji(ReactionEmoji.unicode("\uD83D\uDCE7")), |
| 142 | + .withEmoji(Emoji.unicode("\uD83D\uDCE7")), |
143 | 143 | SelectMenu.Option.of(i18n.apply("command.message.selection.embed.name"), SELECT_EMBED) |
144 | 144 | .withDescription(i18n.apply("command.message.selection.embed.desc")) |
145 | | - .withEmoji(ReactionEmoji.unicode("\uD83D\uDCDC"))) |
| 145 | + .withEmoji(Emoji.unicode("\uD83D\uDCDC"))) |
146 | 146 | .withPlaceholder(i18n.apply("command.message.selection.hint")); |
147 | 147 | return event.reply() |
148 | 148 | .withEphemeral(true) |
149 | 149 | .withComponents(ActionRow.of(selectMenu)); |
150 | 150 | } |
151 | 151 |
|
152 | 152 | private Button getEditButton(Translator i18n) { |
153 | | - return Button.primary(EDIT_ID, ReactionEmoji.unicode("\u270F\uFE0F"), |
| 153 | + return Button.primary(EDIT_ID, Emoji.unicode("\u270F\uFE0F"), |
154 | 154 | i18n.apply("command.message.edit")); |
155 | 155 | } |
156 | 156 |
|
157 | 157 | private Button getImportButton(Translator i18n) { |
158 | | - return Button.primary(IMPORT_ID, ReactionEmoji.unicode("\u2B07\uFE0F"), |
| 158 | + return Button.primary(IMPORT_ID, Emoji.unicode("\u2B07\uFE0F"), |
159 | 159 | i18n.apply("command.message.import")); |
160 | 160 | } |
161 | 161 |
|
162 | 162 | private Button getSendButton(Translator i18n) { |
163 | | - return Button.success(SEND_ID, ReactionEmoji.unicode("\uD83D\uDCE8"), |
| 163 | + return Button.success(SEND_ID, Emoji.unicode("\uD83D\uDCE8"), |
164 | 164 | i18n.apply("command.message.send")); |
165 | 165 | } |
166 | 166 |
|
@@ -212,7 +212,7 @@ public InteractionPresentModalSpec createEmbedEditModal(Translator i18n, Message |
212 | 212 | } |
213 | 213 |
|
214 | 214 | TextInput imageInput = TextInput.small(EE_IMAGE_ID, |
215 | | - i18n.apply("command.message.embed.image")) |
| 215 | + i18n.apply("command.message.embed.image")) |
216 | 216 | .required(false); |
217 | 217 | if (embed.getImage().isPresent()) { |
218 | 218 | String imageUrl = embed.getImage().map(Embed.Image::getUrl).orElseThrow(); |
@@ -283,7 +283,7 @@ public Mono<Void> onButtonInteract(ButtonInteractionEvent event) { |
283 | 283 | modalSpec = this.createMessageEditModal(i18n, message); |
284 | 284 | } else { |
285 | 285 | // more complex embed creation modal |
286 | | - Embed embed = message.getEmbeds().get(0); |
| 286 | + Embed embed = message.getEmbeds().getFirst(); |
287 | 287 | modalSpec = this.createEmbedEditModal(i18n, message, embed); |
288 | 288 | } |
289 | 289 |
|
|
0 commit comments