Repository: Pycord-Development/pycord

Issue:
Interaction failed on embed only messages
### Summary

Interaction fails when the view message doesnt contains text messages

### Reproduction Steps

`await ctx.send(embed=embed,view=view)` will not work and it will return Interaction failed in Discord. No errors even though I created an error handler.

`await ctx.send(content="Test",embed=embed,view=view)` this worked for me. Maybe it doesnt work whenever content is None.

**Note:** The first code above worked for me yesterday on both my bots, but after restarting both of them today it stopped working. I tried reinstalling 2.0 and the bug is still there. Couple days ago someone has the same issue as I did but I forgot who is it.

### Minimal Reproducible Code

```python
@bot.command()
async def test(ctx):
  view = class.Confirm(ctx)
  embed = discord.Embed(title="Test",color=color.blurple())
  await ctx.send(embed=embed,view=view)

  await view.wait()

  if view.value is None:
      await ctx.send("Timed out...")
  elif view.value:
      await ctx.send("Confirmed...")
  else:
      await ctx.send("Cancelled...")
```


### Expected Results

Expecting this would work: `await ctx.send(embed=embed,view=view)`

### Actual Results

But it returns interaction failed in Discord without any errors.

### Intents

default

### System Information

py-cord-2.0.0a3844+g2858bd17

### 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:
Same Problem here .Im On the slash branch
same problem here :(

I have tested this (assuming that the Confirm view is the one from the examples):
```py
@bot.command()
async def test(context):
    view = Confirm()
    embed = discord.Embed(title="Test",color=discord.Color.blurple())
    await context.send(embed=embed,view=view)

    await view.wait()

    if view.value is None:
        await context.send("Timed out...")
    elif view.value:
        await context.send("Confirmed...")
    else:
        await context.send("Cancelled...")
```
and no error occurred... Could you elaborate on what your code is for your Confirm class and what you are doing to reproduce this.
> I have tested this (assuming that the Confirm view is the one from the examples):
> 
> ```python
> @bot.command()
> async def test(context):
>     view = Confirm()
>     embed = discord.Embed(title="Test",color=discord.Color.blurple())
>     await context.send(embed=embed,view=view)
> 
>     await view.wait()
> 
>     if view.value is None:
>         await context.send("Timed out...")
>     elif view.value:
>         await context.send("Confirmed...")
>     else:
>         await context.send("Cancelled...")
> ```
> 
> and no error occurred... Could you elaborate on what your code is for your Confirm class and what you are doing to reproduce this.

I tested this a few minutes ago and am also having this issue. The issue you will always get "this interaction failed" whenever you click a button, and eventually `view.value` will return None after it times out. 

Did some testing, it only appears to happen with `interaction.response.send_message()`, as I can use `interaction.response.edit_message()` as expected with embeds.
> I have tested this (assuming that the Confirm view is the one from the examples):
> 
> ```python
> @bot.command()
> async def test(context):
>     view = Confirm()
>     embed = discord.Embed(title="Test",color=discord.Color.blurple())
>     await context.send(embed=embed,view=view)
> 
>     await view.wait()
> 
>     if view.value is None:
>         await context.send("Timed out...")
>     elif view.value:
>         await context.send("Confirmed...")
>     else:
>         await context.send("Cancelled...")
> ```
> 
> and no error occurred... Could you elaborate on what your code is for your Confirm class and what you are doing to reproduce this.

<h1>Code that is not working</h1>
This is my Confirm class code

```python
class Confirm(discord.ui.View):
  def __init__(self, ctx, user):
    super().__init__(timeout=20)
    self.ctx= ctx
    self.value = "No response"
    self.user = user

  @discord.ui.button(label="Yes", style=discord.ButtonStyle.green)
  async def yes(self, button: discord.ui.Button, interaction: discord.Interaction):
    self.stop()
    for child in self.children:
      child.disabled = True
    self.value = True
    await interaction.response.edit_message(view=self)
    # await interaction.response.send_message("Confirming", ephemeral=True)

  @discord.ui.button(label="No", style=discord.ButtonStyle.red)
  async def no(self, button: discord.ui.Button, interaction: discord.Interaction):
    self.stop()
    for child in self.children:
      child.disabled = True
    self.value = False
    await interaction.response.edit_message(view=self)
    # await interaction.response.send_message("Cancelling", ephemeral=True)

  async def on_timeout(self):
    self.stop()
    for child in self.children:
      child.disabled = True
    self.value = None
    await self.message.edit(view=self)

  async def interaction_check(self, interaction):
    if interaction.user != self.user:
      await interaction.response.send_message("Its not for you!", ephemeral=True)
      return False
    return True
```


And this is the my command code
```python
import interactions # My file that stores interaction classes

color = discord.Colour

@bot.command()
async def test2(ctx):

    embed = discord.Embed(title="Testing", color=color.blurple())
    view = interactions.Confirm(ctx, ctx.author)
    view.message = await ctx.send(embed=embed, view=view)

    await view.wait()
    await ctx.send(view.value)
```
And this is what happened
![image](https://user-images.githubusercontent.com/78070496/133357039-c9a9db58-430f-476d-a38f-42520ba56a2e.png)

<h1>Code that is working</h1>
The Confirm class is exactly same as the one above, I did not change anything.

I just added a text message to my message with embed and view
```python
import interactions # My file that stores interaction classes

color = discord.Colour

@bot.command()
async def test2(ctx):

    embed = discord.Embed(title="Testing", color=color.blurple())
    view = interactions.Confirm(ctx, ctx.author)
    view.message = await ctx.send("Test", embed=embed, view=view)

    await view.wait()
    await ctx.send(view.value)
```
Then it works
![image](https://user-images.githubusercontent.com/78070496/133357658-a5dc3ab4-87c4-4a59-8416-ff1ce39740ac.png)

Same problem :/
~~I can't reproduce your error, running the code that you said doesn't work just gave me this output:~~
Sorry it seems I hadn't updated pycord
Can confirm that this is a bug. 
yep. just happened to me. Any planned patches? just happened recently too...
Can also confirm this issue, it's been acknowledged by one of the devs so lets hope it gets fixed soon \:)
Yep I've been having the same issue since yesterday. I can also confirm!

Resolving patch:
diff --git a/discord/message.py b/discord/message.py
--- a/discord/message.py
+++ b/discord/message.py
@@ -506,11 +506,7 @@ class Message(Hashable):
         .. describe:: hash(x)
 
             Returns the message's hash.
-            
-        .. describe:: len(x)
-        
-            Returns the length of the message's content.
-            
+
     Attributes
     -----------
     tts: :class:`bool`
@@ -720,9 +716,6 @@ def __repr__(self) -> str:
             f'<{name} id={self.id} channel={self.channel!r} type={self.type!r} author={self.author!r} flags={self.flags!r}>'
         )
 
-    def __len__(self):
-        return len(self.content)
-
     def _try_patch(self, data, key, transform=None) -> None:
         try:
             value = data[key]


Test patch: