mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Automatically cast inline result ids to string
This commit is contained in:
parent
4d1abbbb79
commit
6ad9caa7c6
@ -16,6 +16,8 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from pyrogram.api import types
|
from pyrogram.api import types
|
||||||
from .inline_query_result import InlineQueryResult
|
from .inline_query_result import InlineQueryResult
|
||||||
|
|
||||||
@ -61,7 +63,7 @@ class InlineQueryResultArticle(InlineQueryResult):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
id: str,
|
id: Any,
|
||||||
title: str,
|
title: str,
|
||||||
input_message_content,
|
input_message_content,
|
||||||
reply_markup=None,
|
reply_markup=None,
|
||||||
@ -84,7 +86,7 @@ class InlineQueryResultArticle(InlineQueryResult):
|
|||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
return types.InputBotInlineResult(
|
return types.InputBotInlineResult(
|
||||||
id=self.id,
|
id=str(self.id),
|
||||||
type=self.type,
|
type=self.type,
|
||||||
send_message=self.input_message_content.write(self.reply_markup),
|
send_message=self.input_message_content.write(self.reply_markup),
|
||||||
title=self.title,
|
title=self.title,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user