Skip to content

Add option to send replies as original author replica#105

Draft
LilasKR wants to merge 3 commits into
Kyrela:mainfrom
LilasKR:codex/20260518-fix
Draft

Add option to send replies as original author replica#105
LilasKR wants to merge 3 commits into
Kyrela:mainfrom
LilasKR:codex/20260518-fix

Conversation

@LilasKR
Copy link
Copy Markdown

@LilasKR LilasKR commented May 18, 2026

Summary

Adds a new Reply Method option to send fixed-link replies as a replica of the original message author instead of the bot.

This was written with Codex, then tested locally.

Context

Reference: Discord report
https://discord.com/channels/1160873160665731134/1215363563791585350

Changes

  • Added a Send as Original Author Replica / Send as %{bot} toggle
  • Sends fixed links through a channel webhook when original author replica mode is enabled
  • Uses the original message author's display name and avatar for the webhook message
  • Disables reply mode when webhook sending is enabled, since webhooks cannot reply
  • Falls back to the normal send path if the webhook cannot be created or retrieved
  • Keeps original message handling under the existing Original Message setting
  • Adds Manage Webhooks permission text, including troubleshooting permissions
  • Updates English and Korean locale strings

Tested

Tested locally after adding the setting column to the local test database.

  • Bot starts successfully
  • Slash commands sync successfully
  • Updated locale YAML files parse successfully
  • Python syntax checks pass for the touched files

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@LilasKR LilasKR force-pushed the codex/20260518-fix branch 2 times, most recently from db978e1 to d9b26b1 Compare May 18, 2026 04:18
@LilasKR LilasKR changed the title [codex] Add original sender profile reply mode Add option to send replies as the original sender May 18, 2026
@LilasKR
Copy link
Copy Markdown
Author

LilasKR commented May 18, 2026

I have read the CLA Document and I hereby sign the CLA

Copy link
Copy Markdown
Owner

@Kyrela Kyrela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this pull request. I haven't tested it yet, but I have a couple issues with the code.

Don't hesitate to debate/argue with me if you don't agree with some of my comments, I'm open to discussion.

On another note, did you fully vibe-coded it, and/or are you a developper? More details about the implication of AI in this PR would be appreciated.

Comment thread database/models/Guild.py
Comment thread locales/en-US.yml Outdated
Comment thread locales/en-US.yml Outdated
Comment thread locales/en-US.yml Outdated
Comment thread cogs/link_fix.py Outdated
Comment thread src/settings.py
Comment thread src/settings.py Outdated
Comment thread cogs/link_fix.py Outdated
Comment thread cogs/link_fix.py Outdated
Comment thread cogs/link_fix.py Outdated
@LilasKR
Copy link
Copy Markdown
Author

LilasKR commented May 18, 2026

Thanks for the review!

I’m a UI/UX designer, not a developer. I can read code to some extent, but most of this was vibe-coded with Codex and then adjusted while testing locally.

I agree with most of your points, and I’ll update the PR.

For the typing indicator: I disabled it in webhook mode because the message is sent by a webhook identity instead of the bot user. In my local test, Discord kept showing the bot as typing for a while even after the webhook message had already been sent.

@LilasKR LilasKR force-pushed the codex/20260518-fix branch from d9b26b1 to 0f1537d Compare May 18, 2026 22:11
@LilasKR LilasKR changed the title Add option to send replies as the original sender Add option to send replies as original author replica May 18, 2026
@LilasKR LilasKR force-pushed the codex/20260518-fix branch from 0f1537d to 451ca15 Compare May 18, 2026 22:17
Copy link
Copy Markdown
Owner

@Kyrela Kyrela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, I was quite busy these days. Thank you for your clarification on the usage of AI.

This is better, but there's still a couple things that doesn't seems right. Some of them are important, and some of them are near-nitpicking.

In my local test, Discord kept showing the bot as typing for a while even after the webhook message had already been sent.

You're right, I forgot about this. The typing indicator disappears after 1s or when a message is sent by the "typer". In that case, the "typer" (the bot) never send any message. I guess disabling it is fine in that case. Let's go with it, if that causes problems in the future, I can always put it back

Comment thread database/migrations/2026_05_19_000000_add_original_author_replica_replies.py Outdated
Comment thread cogs/link_fix.py Outdated
Comment thread cogs/link_fix.py Outdated
Comment thread locales/en-US.yml Outdated
Comment thread src/settings.py Outdated
Comment thread src/settings.py Outdated
Comment thread cogs/link_fix.py Outdated
Comment thread cogs/link_fix.py
return None
webhook = next((
w for w in webhooks
if getattr(w.user, 'id', None) == bot.user.id
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have told me that self wasn't available in this context instead of passing the reference across the whole file, my bad. You can use discore.Bot.get() in this context.

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.

2 participants