diff --git a/src/main/kotlin/fr/jais/scraper/jobs/AyaneJob.kt b/src/main/kotlin/fr/jais/scraper/jobs/AyaneJob.kt index 5ae99ff..a48c83d 100644 --- a/src/main/kotlin/fr/jais/scraper/jobs/AyaneJob.kt +++ b/src/main/kotlin/fr/jais/scraper/jobs/AyaneJob.kt @@ -44,17 +44,21 @@ class AyaneJob : Job { val day = LocalDate.now().dayOfWeek.getDisplayName(TextStyle.FULL, Locale.FRANCE).lowercase() val date = LocalDate.now().format(DateTimeFormatter.ofPattern("dd/MM")) - var string = "🎯 | Votre planning #anime pour ce $day $date :\n" + var string: String - episodes.forEach { - string += "\n#${ - it.first.name.split(":", ",", "-").first().capitalizeWords().onlyLettersAndDigits() - } EP${it.second.split(" ")[1]}" - } + do { + string = "🎯 | Votre planning #anime pour ce $day $date :\n" + + episodes.shuffled().take(7).forEach { + string += "\n#${ + it.first.name.split(":", ",", "-").first().capitalizeWords().onlyLettersAndDigits() + } EP${it.second.split(" ")[1]}" + } - string += """ + string += """ Bonne journée ! 😊""" + } while (string.length > 250) Logger.info(string)