Skip to content

Commit

Permalink
New Update
Browse files Browse the repository at this point in the history
1. fix
  • Loading branch information
megoRU committed Feb 15, 2024
1 parent 103f059 commit 8fddd9b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
13 changes: 8 additions & 5 deletions src/main/java/main/giveaway/GiveawayEmbedUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ public static EmbedBuilder giveawayPattern(final long guildId) {
String.format(jsonParsers.getLocale("gift_ends_giveaway", guildId), endTime, endTime);
embedBuilder.appendDescription(endTimeFormat);
}


String giftHosted = String.format(jsonParsers.getLocale("gift_hosted", guildId), createdUserId);

//Hosted By
String hostedBy = String.format("\nHosted by: <@%s>", createdUserId);
embedBuilder.appendDescription(hostedBy);
embedBuilder.appendDescription(giftHosted);
//Image
embedBuilder.setImage(imageUrl);
//Footer
Expand Down Expand Up @@ -114,10 +115,12 @@ public static EmbedBuilder giveawayEnd(final String winners, int countWinners, f
}
long giveawayIdLong = giveaway.getMessageId();

String hostedBy = String.format("\nHosted by: <@%s>", createdUserId);
String giftHosted = String.format(jsonParsers.getLocale("gift_hosted", guildId), createdUserId);

String giveawayIdDescription = String.format("\n\nGiveaway ID: `%s`", giveawayIdLong);

embedBuilder.appendDescription(hostedBy);
//Hosted By
embedBuilder.appendDescription(giftHosted);
embedBuilder.appendDescription(giveawayIdDescription);

if (giveaway.getUrlImage() != null) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/json/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"errors_descriptions_again": "Don't worry, the task is already running.\nWe will complete your Giveaway as soon as we can.",
"you_wrote_date": "You wrote the date: `%s`\nNow (UTC±0): ⠀⠀⠀⠀`%s`",
"schedule_start": "Launch date and time: <t:%s:R> (<t:%s:f>)\nEnd date and time: %s\nIn the channel: <#%s>",
"schedule_end": "Not set"
"schedule_end": "Not set",
"gift_hosted": "\nCreator: <@%s>"
}
3 changes: 2 additions & 1 deletion src/main/resources/json/rus.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"errors_descriptions_again": "Не волнуйтесь, задача уже запущена.\nМы завершим ваш Giveaway, как только сможем.",
"you_wrote_date": "Вы написали дату: `%s`\nСейчас (UTC±0):⠀ ⠀`%s`",
"schedule_start": "Дата и время запуска: <t:%s:R> (<t:%s:f>)\nДата и время завершения: %s\nВ канале: <#%s>",
"schedule_end": "Не задано"
"schedule_end": "Не задано",
"gift_hosted": "\nСоздатель: <@%s>"
}

0 comments on commit 8fddd9b

Please sign in to comment.