Skip to content

fix(discord-command-bot): make the Python setup script run and send JSON - #499

Merged
HarshMN2345 merged 1 commit into
mainfrom
fix-discord-bot-python-setup
Nov 9, 2026
Merged

HarshMN2345 merged 1 commit into
mainfrom
fix-discord-bot-python-setup

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

Fixes the Python part of #491.

  • setup.py runs as a script (python src/setup.py), so the relative from .utils import failed and the build broke. It now imports utils directly, which resolves because the script's directory is on the path.
  • The command was posted as form data under a JSON content type. It now uses json=.

Tested by running python src/setup.py with the template's requirements: before, ImportError: attempted relative import; after, it posts {"name": "hello", ...} as JSON to Discord (401 with a dummy token, as expected).

The Go variant's missing registration step is not covered here.

@appwrite

appwrite Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The Python Discord command setup now imports its utility using the script execution path and submits the registration payload as JSON. This matches the documented python src/setup.py build command and Discord’s expected request format.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
python/discord_command_bot/src/setup.py Uses a script-compatible utility import and sends the registration command through Requests’ JSON encoder.

Reviewed 939a6bf · Details · Comment @appwrite review to re-run, or mention @appwrite with a question.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@HarshMN2345
HarshMN2345 merged commit 138e7ac into main Nov 9, 2026
40 of 45 checks passed
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