Skip to content

Commit 4fb38da

Browse files
authored
Merge pull request #333 from Dorukyum/remove-duplicate-file-checks
Remove duplicate file checks
2 parents 9496c72 + 8de6034 commit 4fb38da

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

discord/interactions.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -570,21 +570,6 @@ async def send_message(
570570
elif not all(isinstance(file, File) for file in files):
571571
raise InvalidArgument('files parameter must be a list of File')
572572

573-
if file is not None and files is not None:
574-
raise InvalidArgument('cannot pass both file and files parameter to send()')
575-
576-
if file is not None:
577-
if not isinstance(file, File):
578-
raise InvalidArgument('file parameter must be File')
579-
else:
580-
files = [file]
581-
582-
if files is not None:
583-
if len(files) > 10:
584-
raise InvalidArgument('files parameter must be a list of up to 10 elements')
585-
elif not all(isinstance(file, File) for file in files):
586-
raise InvalidArgument('files parameter must be a list of File')
587-
588573
parent = self._parent
589574
adapter = async_context.get()
590575
try:
@@ -840,4 +825,4 @@ async def inner_call(delay: float = delay):
840825

841826
asyncio.create_task(inner_call())
842827
else:
843-
await self._state._interaction.delete_original_message()
828+
await self._state._interaction.delete_original_message()

0 commit comments

Comments
 (0)