Repository: Pycord-Development/pycord

Issue:
Fetch Channel unexpected error
### Summary

Unable to send message in a designated channel

### Reproduction Steps

```py
channel = bot.get_channel(a valid channel ID here)
await channel.send("Test")
```

It should send the message Test to that channel. 

### Minimal Reproducible Code

```python
channel = bot.get_channel(a valid channel ID here)
await channel.send("Test")
```


### Expected Results

Send the message Test to that channel

### Actual Results

```py
2022-10-23T13:21:43.019259+00:00 app[worker.1]: Ignoring exception in command setup:
2022-10-23T13:21:43.020609+00:00 app[worker.1]: Traceback (most recent call last):
2022-10-23T13:21:43.020660+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/discord/commands/core.py", line 124, in wrapped
2022-10-23T13:21:43.020662+00:00 app[worker.1]:     ret = await coro(arg)
2022-10-23T13:21:43.020679+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/discord/commands/core.py", line 970, in _invoke
2022-10-23T13:21:43.020680+00:00 app[worker.1]:     await self.callback(self.cog, ctx, **kwargs)
2022-10-23T13:21:43.020697+00:00 app[worker.1]:   File "/app/cogs/setup.py", line 18, in slash_setup
2022-10-23T13:21:43.020698+00:00 app[worker.1]:     await bump_channel.send("Testing", delete_after=1)
2022-10-23T13:21:43.020716+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/discord/abc.py", line 1591, in send
2022-10-23T13:21:43.020718+00:00 app[worker.1]:     flags=flags.value,
2022-10-23T13:21:43.020744+00:00 app[worker.1]: AttributeError: 'int' object has no attribute 'value'
```

### Intents

default()

### System Information

```
- Python v3.10.8-final
- py-cord v2.1.3-final
- aiohttp v3.7.4.post0
- system info: Windows 10 10.0.22621
```

### 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

The issue were not there until yesterday. The codes had been working smoothly and no changes are made.


Discussion:
Found out the reason, the bot fetched an unfinished developer version

Resolving patch:
diff --git a/discord/abc.py b/discord/abc.py
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -1489,7 +1489,11 @@ async def send(
                 )
             embeds = [embed.to_dict() for embed in embeds]
 
-        flags = MessageFlags.suppress_embeds if suppress else MessageFlags.DEFAULT_VALUE
+        flags = (
+            MessageFlags.suppress_embeds.flag
+            if suppress
+            else MessageFlags.DEFAULT_VALUE
+        )
 
         if stickers is not None:
             stickers = [sticker.id for sticker in stickers]
@@ -1545,7 +1549,7 @@ async def send(
                     message_reference=reference,
                     stickers=stickers,
                     components=components,
-                    flags=flags.value,
+                    flags=flags,
                 )
             finally:
                 file.close()
@@ -1571,7 +1575,7 @@ async def send(
                     message_reference=reference,
                     stickers=stickers,
                     components=components,
-                    flags=flags.value,
+                    flags=flags,
                 )
             finally:
                 for f in files:
@@ -1588,7 +1592,7 @@ async def send(
                 message_reference=reference,
                 stickers=stickers,
                 components=components,
-                flags=flags.value,
+                flags=flags,
             )
 
         ret = state.create_message(channel=channel, data=data)


Test patch: