mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
Send the same message to recipients
This commit is contained in:
@@ -8,10 +8,10 @@ let
|
||||
startAt = bot.time;
|
||||
serviceConfig.Type = "oneshot";
|
||||
wants = [ "network-online.target" ];
|
||||
script = strings.concatStringsSep "\n" (map (chatId: ''
|
||||
script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})"] ++ map (chatId: ''
|
||||
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
||||
-d chat_id="${chatId}" \
|
||||
-d text="$(${bot.command})" ${
|
||||
-d text="$QUOTE" ${
|
||||
if bot.parseMode == null then ""
|
||||
else "-d parse_mode=${bot.parseMode}"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ in {
|
||||
enable = true;
|
||||
time = "08/6:00";
|
||||
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
||||
chatIds = [ "18980945" ];
|
||||
chatIds = [ "18980945" "757821027" ];
|
||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||
parseMode = "Markdown";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user