Fix character counting on /look. Initial support for jumping over DST boundaries

This commit is contained in:
jude
2022-11-20 12:20:10 +00:00
parent e9792e6322
commit 6e087bd2dd
6 changed files with 571 additions and 495 deletions

View File

@ -245,7 +245,7 @@ pub async fn look(
char_count < EMBED_DESCRIPTION_MAX_LENGTH
})
.collect::<Vec<String>>()
.join("\n");
.join("");
let pages = reminders
.iter()

View File

@ -113,7 +113,7 @@ impl ComponentDataModel {
char_count < EMBED_DESCRIPTION_MAX_LENGTH
})
.collect::<Vec<String>>()
.join("\n");
.join("");
let mut embed = CreateEmbed::default();
embed

View File

@ -326,14 +326,14 @@ WHERE
if self.interval_seconds.is_some() || self.interval_months.is_some() {
format!(
"'{}' *occurs next at* **{}**, repeating (set by {})",
"'{}' *occurs next at* **{}**, repeating (set by {})\n",
self.display_content(),
time_display,
self.set_by.map(|i| format!("<@{}>", i)).unwrap_or_else(|| "unknown".to_string())
)
} else {
format!(
"'{}' *occurs next at* **{}** (set by {})",
"'{}' *occurs next at* **{}** (set by {})\n",
self.display_content(),
time_display,
self.set_by.map(|i| format!("<@{}>", i)).unwrap_or_else(|| "unknown".to_string())