Skip to content

feat: add --replace flag to delete and resend messages#69

Open
mc0de wants to merge 3 commits into
fieu:masterfrom
mc0de:master
Open

feat: add --replace flag to delete and resend messages#69
mc0de wants to merge 3 commits into
fieu:masterfrom
mc0de:master

Conversation

@mc0de

@mc0de mc0de commented May 9, 2026

Copy link
Copy Markdown

Allows keeping only the latest message of a given type by deleting the previous one before posting a new one. The returned message ID is saved to .discord_msg_ for use on subsequent invocations.

Useful when you want only the latest message of a given type to appear in the channel — e.g. server update notifications — without spamming chat history.

Usage: ./discord.sh --webhook-url="..." --text "Server updated" --replace game-server-update

mc0de added 3 commits May 9, 2026 15:39
Allows keeping only the latest message of a given type by deleting the
previous one before posting a new one. The returned message ID is saved
to .discord_msg_<key> for use on subsequent invocations.
${fields::-1} requires bash 4.2+ and silently fails on macOS (bash 3.2),
causing fields to never appear in embeds. Replaced with ${fields%,}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant