Skip to content

feat: add date time message entity#459

Open
fluffur wants to merge 1 commit into
gotd:mainfrom
fluffur:add-date-time-message-entity
Open

feat: add date time message entity#459
fluffur wants to merge 1 commit into
gotd:mainfrom
fluffur:add-date-time-message-entity

Conversation

@fluffur

@fluffur fluffur commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Parse new date time into message entity

func (h *Handler) Help(c *botapi.Context) error {
	log.Printf("%+v\n", c.Message().Entities)

	return nil
}
[
  {
    "type": "bot_command",
    "offset": 0,
    "length": 5
  },
  {
    "type": "date_time",
    "offset": 6,
    "length": 19,
    "unix_time": 1783148399
  }
]

To make sending messages with formatted time work in HTML and MD formats it is required to do some changes in gotd/td parsers as well

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.46%. Comparing base (3466ee3) to head (6a131d2).

Files with missing lines Patch % Lines
entities.go 0.00% 18 Missing ⚠️
codec_misc.go 0.00% 14 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
- Coverage   78.78%   78.46%   -0.33%     
==========================================
  Files         118      118              
  Lines        8316     8350      +34     
==========================================
  Hits         6552     6552              
- Misses       1237     1269      +32     
- Partials      527      529       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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