mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-24 13:44:33 +00:00
[AB-xxx] enabling localization by adding the localization as a system config key
fixing methods which did not provide the server id to template rendering refactoring channel service method to remove a duplicate fixing template loading method to not throw an exception when template was not found
This commit is contained in:
@@ -57,7 +57,7 @@ public class ShowAvatar extends AbstractConditionableCommand {
|
||||
.build();
|
||||
log.info("Showing avatar for member {} towards user {} in channel {} in server {}.",
|
||||
memberToShow.getId(), commandContext.getAuthor().getId(), commandContext.getChannel().getId(), commandContext.getGuild().getId());
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(SHOW_AVATAR_RESPONSE_TEMPLATE, model, commandContext.getChannel()))
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(SHOW_AVATAR_RESPONSE_TEMPLATE, model, commandContext.getChannel()))
|
||||
.thenApply(aVoid -> CommandResult.fromIgnored());
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ShowEmote extends AbstractConditionableCommand {
|
||||
.builder()
|
||||
.emote(emoteParameter)
|
||||
.build();
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(SHOW_EMOTE_RESPONSE_TEMPLATE, emoteLog, commandContext.getChannel()))
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(SHOW_EMOTE_RESPONSE_TEMPLATE, emoteLog, commandContext.getChannel()))
|
||||
.thenApply(aVoid -> CommandResult.fromIgnored());
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public class UserInfo extends AbstractConditionableCommand {
|
||||
|
||||
@Transactional
|
||||
public CompletableFuture<Void> sendResponse(MessageChannel channel, UserInfoModel model) {
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(USER_INFO_RESPONSE, model, channel));
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(USER_INFO_RESPONSE, model, channel));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
||||
Reference in New Issue
Block a user