Skip to content

Conversation

Paillat-dev
Copy link
Member

@Paillat-dev Paillat-dev commented Feb 16, 2025

Summary

Allows to change the base url e.g. if you wanna use canary. It's a very simple implementation idk if this would be enough to get merged.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@Paillat-dev Paillat-dev requested a review from a team as a code owner February 16, 2025 17:02
@pullapprove4 pullapprove4 bot requested a review from Dorukyum February 16, 2025 17:02
@Paillat-dev Paillat-dev changed the title ✨ Refactor API base URL handling in Route class feat: ✨ Allow changing base url with Route.API_BASE_URL Feb 16, 2025
@Lulalaby Lulalaby enabled auto-merge (squash) February 16, 2025 20:49
Copy link
Member

@Lulalaby Lulalaby left a comment

Choose a reason for hiding this comment

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

good addition for testing new features easily

@Paillat-dev
Copy link
Member Author

For reference, here is how to use:

import discord

discord.Route.API_BASE_URL = "https://canary.discord.com/api/v{API_VERSION}"

@Lulalaby Lulalaby disabled auto-merge February 17, 2025 10:00
@Lulalaby Lulalaby merged commit eb2e35a into Pycord-Development:master Feb 17, 2025
28 of 30 checks passed
@Paillat-dev Paillat-dev deleted the feat/custom-base-url branch February 17, 2025 10:55
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