Skip to content

Conversation

@ToothyDev
Copy link

@ToothyDev ToothyDev commented Jan 2, 2026

Summary

This PR aims to subclass the builtin datetime.datetime class and move any time-related utils methods there.
See issue #149

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.

@pycord-app
Copy link

pycord-app bot commented Jan 2, 2026

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/224/head:pr-224
git checkout pr-224

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord-next@refs/pull/224/head

@read-the-docs-community
Copy link

read-the-docs-community bot commented Jan 2, 2026

Documentation build overview

📚 pycord-next | 🛠️ Build #30869020 | 📁 Comparing 8ac36da against latest (0d92d17)


🔍 Preview build

Show files changed (39 files in total): 📝 38 modified | ➕ 1 added | ➖ 0 deleted
File Status
genindex.html 📝 modified
migrating_to_v2.html 📝 modified
_modules/index.html 📝 modified
api/audit_logs.html 📝 modified
api/data_classes.html 📝 modified
api/events.html 📝 modified
api/models.html 📝 modified
api/utils.html 📝 modified
api/webhooks.html 📝 modified
_modules/discord/activity.html 📝 modified
_modules/discord/audit_logs.html 📝 modified
_modules/discord/datetime.html ➕ added
_modules/discord/embeds.html 📝 modified
_modules/discord/emoji.html 📝 modified
_modules/discord/guild.html 📝 modified
_modules/discord/integrations.html 📝 modified
_modules/discord/interactions.html 📝 modified
_modules/discord/invite.html 📝 modified
_modules/discord/member.html 📝 modified
_modules/discord/message.html 📝 modified
_modules/discord/monetization.html 📝 modified
_modules/discord/object.html 📝 modified
_modules/discord/onboarding.html 📝 modified
_modules/discord/partial_emoji.html 📝 modified
_modules/discord/poll.html 📝 modified
_modules/discord/role.html 📝 modified
_modules/discord/scheduled_events.html 📝 modified
_modules/discord/sticker.html 📝 modified
_modules/discord/template.html 📝 modified
_modules/discord/user.html 📝 modified
_modules/discord/widget.html 📝 modified
ext/tasks/index.html 📝 modified
_modules/discord/channel/thread.html 📝 modified
_modules/discord/commands/core.html 📝 modified
_modules/discord/events/channel.html 📝 modified
_modules/discord/events/typing.html 📝 modified
_modules/discord/ext/tasks.html 📝 modified
_modules/discord/utils/public.html 📝 modified
modules/discord/webhook/async.html 📝 modified

@ToothyDev ToothyDev marked this pull request as ready for review January 2, 2026 16:59
@ToothyDev ToothyDev requested a review from a team as a code owner January 2, 2026 16:59
@NeloBlivion NeloBlivion linked an issue Jan 2, 2026 that may be closed by this pull request
Copy link
Member

@NeloBlivion NeloBlivion left a comment

Choose a reason for hiding this comment

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

Mostly just catching strays, make sure to check everything. All public-facing attributes and methods should return DiscordTime, but parameters entered on the user's end can remain as datetime.

ToothyDev and others added 3 commits January 2, 2026 20:30
Co-authored-by: NeloBlivion <41271523+neloblivion@users.noreply.github.com>
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
Signed-off-by: ToothyDev <55001472+ToothyDev@users.noreply.github.com>
@Paillat-dev
Copy link
Member

Imma take a look tomorrow I think I'm rly tired rn sorry for the delay but seems good so far

ToothyDev and others added 2 commits January 3, 2026 14:02
Co-authored-by: Paillat-dev <me@paillat.dev>
ToothyDev and others added 2 commits January 3, 2026 17:15
Co-authored-by: Paillat-dev <me@paillat.dev>
Co-authored-by: Paillat-dev <me@paillat.dev>
@Paillat-dev Paillat-dev enabled auto-merge (squash) January 3, 2026 16:34
@Paillat-dev Paillat-dev merged commit 915aec7 into Pycord-Development:master Jan 3, 2026
24 checks passed
@ToothyDev ToothyDev deleted the next/feat/subclass-datetime branch January 3, 2026 16:40
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.

Subclass datetime

4 participants