Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Properly handle multiple parameters in command input #41

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tgram/methods/send_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ async def send_animation(
result = await self._send_request(
"sendAnimation",
chat_id=chat_id,
animation=get_file_path(animation),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
Expand All @@ -140,5 +139,6 @@ async def send_animation(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
animation=get_file_path(animation),
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ async def send_audio(
result = await self._send_request(
"sendAudio",
chat_id=chat_id,
audio=get_file_path(audio),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
Expand All @@ -133,5 +132,6 @@ async def send_audio(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
audio=get_file_path(audio),
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ async def send_document(
result = await self._send_request(
"sendDocument",
chat_id=chat_id,
document=get_file_path(document),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
thumbnail=get_file_path(thumbnail),
Expand All @@ -122,5 +121,6 @@ async def send_document(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
document=get_file_path(document),
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ async def send_photo(
result = await self._send_request(
"sendPhoto",
chat_id=chat_id,
photo=get_file_path(photo),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
Expand All @@ -114,5 +113,6 @@ async def send_photo(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
photo=get_file_path(photo),
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_sticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ async def send_sticker(
result = await self._send_request(
"sendSticker",
chat_id=chat_id,
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
Expand All @@ -94,5 +93,6 @@ async def send_sticker(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
sticker=sticker,
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ async def send_video(
result = await self._send_request(
"sendVideo",
chat_id=chat_id,
video=get_file_path(video),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
Expand All @@ -143,5 +142,6 @@ async def send_video(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
video=get_file_path(video),
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_video_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ async def send_video_note(
result = await self._send_request(
"sendVideoNote",
chat_id=chat_id,
video_note=get_file_path(video_note),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
Expand All @@ -108,5 +107,6 @@ async def send_video_note(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
video_note=get_file_path(video_note),
)
return Message._parse(me=self, d=result["result"])
2 changes: 1 addition & 1 deletion tgram/methods/send_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ async def send_voice(
result = await self._send_request(
"sendVoice",
chat_id=chat_id,
voice=get_file_path(voice),
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
Expand All @@ -107,5 +106,6 @@ async def send_voice(
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
voice=get_file_path(voice),
)
return Message._parse(me=self, d=result["result"])