Repository: Pycord-Development/pycord

Issue:
`scheduled_events` method of Guild Object isn't working as it should
### Summary

It gives TypeError where it should return the list of scheduled events

### Reproduction Steps

I used jishaku and did the following: 
```py
!jsk py _ctx.guild.scheduled_events
```

### Minimal Reproducible Code

```python
@bot jsk py _ctx.guild.scheduled_events
```


### Expected Results

I expect it to return ScheduledEvent Object just like how it is suppose to work.
When I tried the same thing (`ctx.guild.scheduled_events`) with discord.py, i was able to retrieve ScheduledEvent object as per my expectations.

### Actual Results

i tried `_ctx.guild.scheduled_events` with jishaku and I got this 

```py
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/features/python.py", line 145, in jsk_python
    async for send, result in AsyncSender(executor):
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/functools.py", line 109, in _internal
    value = await base.asend(self.send_value)
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/repl/compilation.py", line 140, in traverse
    async for send, result in AsyncSender(func(*self.args)):
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/functools.py", line 109, in _internal
    value = await base.asend(self.send_value)
  File "<repl>", line 1, in _repl_coroutine
    _ctx.guild.scheduled_events.__repr__()
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/scheduled_events.py", line 230, in __repr__
    f"<ScheduledEvent id={self.id} "
TypeError: __str__ returned non-string (type Object)
```
It's always TypeError when there is some scheduled event in guild (this is not fine), but when there's no scheduled, it returns an empty list (this is fine)

### Intents

default intents

### System Information

- Python v3.10.4-final
- py-cord v2.0.0-beta
    - py-cord pkg_resources: v2.0.0b7
- aiohttp v3.8.1
- system info: Windows 10 10.0.22000

### 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_
`scheduled_events` method of Guild Object isn't working as it should
### Summary

It gives TypeError where it should return the list of scheduled events

### Reproduction Steps

I used jishaku and did the following: 
```py
!jsk py _ctx.guild.scheduled_events
```

### Minimal Reproducible Code

```python
@bot jsk py _ctx.guild.scheduled_events
```


### Expected Results

I expect it to return ScheduledEvent Object just like how it is suppose to work.
When I tried the same thing (`ctx.guild.scheduled_events`) with discord.py, i was able to retrieve ScheduledEvent object as per my expectations.

### Actual Results

i tried `_ctx.guild.scheduled_events` with jishaku and I got this 

```py
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/features/python.py", line 145, in jsk_python
    async for send, result in AsyncSender(executor):
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/functools.py", line 109, in _internal
    value = await base.asend(self.send_value)
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/repl/compilation.py", line 140, in traverse
    async for send, result in AsyncSender(func(*self.args)):
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/functools.py", line 109, in _internal
    value = await base.asend(self.send_value)
  File "<repl>", line 1, in _repl_coroutine
    _ctx.guild.scheduled_events.__repr__()
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/scheduled_events.py", line 230, in __repr__
    f"<ScheduledEvent id={self.id} "
TypeError: __str__ returned non-string (type Object)
```
It's always TypeError when there is some scheduled event in guild (this is not fine), but when there's no scheduled, it returns an empty list (this is fine)

### Intents

default intents

### System Information

- Python v3.10.4-final
- py-cord v2.0.0-beta
    - py-cord pkg_resources: v2.0.0b7
- aiohttp v3.8.1
- system info: Windows 10 10.0.22000

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

Resolving patch:
diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py
--- a/discord/scheduled_events.py
+++ b/discord/scheduled_events.py
@@ -99,7 +99,7 @@ def __init__(
             self.value = value
 
     def __repr__(self) -> str:
-        return f"<ScheduledEventLocation value={self.value} type={self.type}>"
+        return f"<ScheduledEventLocation value={self.value!r} type={self.type}>"
 
     def __str__(self) -> str:
         return str(self.value)


Test patch: