Repository: Pycord-Development/pycord

Issue:
Incorrect InvalidArgument when reponding with files
### Summary

`InvalidArgument: cannot pass both file and files parameter to send()` is raised even though only `file` is passed.

### Reproduction Steps

- Create an interaction handler (button, slash command etc.)
- Make it respond with a file

### Minimal Reproducible Code

```python
async def callback(i):
    await i.response.send_message(file=discord.File("./main.py"))
```


### Expected Results

Send the message containing the file

### Actual Results

InvalidArgument wrapped in ApplicationCommandInvokeError
```
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.8/site-packages/discord/ui/view.py", line 365, in _scheduled_task
    await item.callback(interaction)
  File "<repl>", line 6, in callback
    await i.response.send_message(file=discord.File("./main.py"), ephemeral=True)
  File "/home/container/.local/lib/python3.8/site-packages/discord/interactions.py", line 574, in send_message
    raise InvalidArgument('cannot pass both file and files parameter to send()')
discord.errors.InvalidArgument: cannot pass both file and files parameter to send()
```

### Intents

Members, messages and guilds

### System Information

- Python v3.8.12-final
- py-cord v2.0.0-alpha
    - py-cord pkg_resources: v2.0.0a4090+g75c129ed
- aiohttp v3.7.4.post0
- system info: Linux 5.4.0-89-generic

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.

### Additional Context

_No response_


Discussion:
i got the same problem when rewriting my action gif cog to work with slash commands

edit: i managed to make a workaround by just using files=[file]

Resolving patch:
diff --git a/discord/interactions.py b/discord/interactions.py
--- a/discord/interactions.py
+++ b/discord/interactions.py
@@ -570,21 +570,6 @@ async def send_message(
             elif not all(isinstance(file, File) for file in files):
                 raise InvalidArgument('files parameter must be a list of File')
 
-        if file is not None and files is not None:
-            raise InvalidArgument('cannot pass both file and files parameter to send()')
-        
-        if file is not None:
-            if not isinstance(file, File):
-                raise InvalidArgument('file parameter must be File')
-            else:
-                files = [file]
-
-        if files is not None:
-            if len(files) > 10:
-                raise InvalidArgument('files parameter must be a list of up to 10 elements')
-            elif not all(isinstance(file, File) for file in files):
-                raise InvalidArgument('files parameter must be a list of File')
-
         parent = self._parent
         adapter = async_context.get()
         try:
@@ -840,4 +825,4 @@ async def inner_call(delay: float = delay):
 
             asyncio.create_task(inner_call())
         else:
-            await self._state._interaction.delete_original_message()
\ No newline at end of file
+            await self._state._interaction.delete_original_message()


Test patch: