Skip to content

Migrate ISODateTime converter from bot repository#311

Merged
jb3 merged 9 commits intopython-discord:mainfrom
oskarnurm:feat/add-ISODateTime-converter
Mar 5, 2026
Merged

Migrate ISODateTime converter from bot repository#311
jb3 merged 9 commits intopython-discord:mainfrom
oskarnurm:feat/add-ISODateTime-converter

Conversation

@oskarnurm
Copy link
Contributor

@oskarnurm oskarnurm commented Mar 4, 2026

Motivation

Currently, the ISODateTime converter is localized to the main python-discord/bot repository. During the development of the .gh stats feature in sir-lancebot (python-discord/sir-lancebot#1729), it was requested that this converter be migrated to bot-core so it can be utilized across the wider ecosystem.

Summary of Changes

  • Extracted the ISODateTime converter class from bot/exts/utilities/converters.py
  • Placed the class and its required imports (dateutil.parser, datetime, discord.ext.commands) into pydis_core/utils/converters.py.

This will allow sir-lancebot and future bots to offload manual date validation directly to the discord.py framework.

Extracts the ISODateTime converter from the main bot repository.
This allows other projects in the ecosystem to natively parse and
validate ISO-8601 strings using discord.py's converter system.
@netlify
Copy link

netlify bot commented Mar 4, 2026

Deploy Preview for bot-core failed. Why did it fail? →

Name Link
🔨 Latest commit 6f9de43
🔍 Latest deploy log https://app.netlify.com/projects/bot-core/deploys/69a8cbb2e87a0e000840fc35

Copy link
Member

@jb3 jb3 left a comment

Choose a reason for hiding this comment

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

Awesome!

Just the linting items that got picked up (unused ctx argument & import block sorting) & this looks good.

One minor nitpick, I think I prefer it being converters.py rather than converter.py.

Otherwise, great stuff!

@jb3 jb3 merged commit 4b500e6 into python-discord:main Mar 5, 2026
2 of 9 checks passed
@oskarnurm oskarnurm deleted the feat/add-ISODateTime-converter branch March 5, 2026 00:20
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