Skip to content

feat: add date time message entity#459

Open
fluffur wants to merge 2 commits into
gotd:mainfrom
fluffur:add-date-time-message-entity
Open

feat: add date time message entity#459
fluffur wants to merge 2 commits 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.87%. Comparing base (3466ee3) to head (fea4f81).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
+ Coverage   78.78%   78.87%   +0.08%     
==========================================
  Files         118      118              
  Lines        8316     8350      +34     
==========================================
+ Hits         6552     6586      +34     
  Misses       1237     1237              
  Partials      527      527              

☔ 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