Skip to content

Commit 08f626f

Browse files
committed
fix: update type for ReplyKeyboardMarkup.keyboard which can accept strings
Closes #11
1 parent c216218 commit 08f626f

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

scripts/generate.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,22 @@ const OVERRIDES: OverridesConfig = {
17441744
},
17451745
},
17461746
},
1747+
ReplyKeyboardMarkup: {
1748+
hash: '',
1749+
fields: {
1750+
keyboard: {
1751+
hash: '7e6f80e1',
1752+
type: T_arrayOf(
1753+
T_arrayOf(
1754+
T_unionOf([
1755+
T_str(),
1756+
T_apiType('KeyboardButton'),
1757+
]),
1758+
),
1759+
),
1760+
},
1761+
},
1762+
},
17471763
KeyboardButtonRequestChat: {
17481764
hash: '0f5a2f91',
17491765
fields: {

src/types.gen.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6663,8 +6663,16 @@ const ReplyKeyboardMarkup = t({
66636663
of: {
66646664
type: 'array',
66656665
of: {
6666-
type: 'api-type',
6667-
name: 'KeyboardButton',
6666+
type: 'union',
6667+
types: [
6668+
{
6669+
type: 'str',
6670+
},
6671+
{
6672+
type: 'api-type',
6673+
name: 'KeyboardButton',
6674+
},
6675+
],
66686676
},
66696677
},
66706678
},

0 commit comments

Comments
 (0)