TCrB Bot hübscher gemacht

This commit is contained in:
2026-04-06 09:24:31 +02:00
parent 23df0ed163
commit a70e46b307
6 changed files with 104 additions and 21 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
function telegramServiceFooter(): string
{
return 'Ein Service des Astronomiemuseums der Sternwarte Sonneberg: https://astronomiemuseum.de';
}
function appendTelegramServiceFooter(string $text): string
{
$footer = telegramServiceFooter();
$trimmedText = trim($text);
if ($trimmedText === '') {
return $footer;
}
if (str_contains($trimmedText, $footer)) {
return $trimmedText;
}
return $trimmedText . "\n\n" . $footer;
}