Skip to content

fix: raise RuntimeError on empty Discord body instead of IndexError - #76

Merged
ldbumble merged 1 commit into
ldbumble:masterfrom
Jah-yee:fix/discord-empty-body-crash
Sep 28, 2026
Merged

ldbumble merged 1 commit into
ldbumble:masterfrom
Jah-yee:fix/discord-empty-body-crash

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

When a Discord reply body is empty (blank), chatformat.split returns no pieces, causing sent[0] to raise IndexError.

Now raises RuntimeError('nothing to send') when body is empty, consistent with other refusal patterns in this file.

Fixes: #66

When a Discord reply body is empty (blank), chatformat.split returns
no pieces, causing 'sent[0]' to raise IndexError.

Now raises RuntimeError('nothing to send') when body is empty,
consistent with other refusal patterns in this file.

Fixes: ldbumble#66
@ldbumble
ldbumble merged commit 448cb92 into ldbumble:master Sep 28, 2026
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.

An empty Discord reply crashes with IndexError instead of a clear error

2 participants