Repository: Pycord-Development/pycord

Issue:
checks passed to `checks` parameter of SlashCommandGroup constructor are not called
### Summary

I am trying to set checks for all the commands in a SlashCommandGroup. I noticed the [checks](https://docs.pycord.dev/en/master/api.html#discord.SlashCommandGroup.checks) parameter for the SlashCommandGroup constructor and attempted to pass lambdas to it as checks. It seems that the checks are not having any effect on whether the commands are usable.

### Reproduction Steps

- Created a SlashCommandGroup with a list of lambdas passed to the `checks` parameter
- Used `bot.add_application_command()` to add it to the bot
- Tried using the commands to determine if the checks were working

### Minimal Reproducible Code

```python
CHECKS = [lambda ctx: ctx.guild != None, lambda ctx: ctx.author.guild_permissions.administrator, lambda ctx: 0 == 1]
# I added the 0 == 1 check just to be sure it wasn't somehow something to do with my server's permissions
# I'm not entirely sure if I did this correctly, so I also tried wrapping each lambda in commands.check(). This produced the same result
config_group = discord.SlashCommandGroup("config", "Commands for configuring the bot in your server.", checks=CHECKS)

@config_group.command()
async def config_test(ctx: ApplicationContext):
    await ctx.respond("Test")

bot.add_application_command(config_group)
```


### Expected Results

A `CheckFailure` should have been raised

### Actual Results

None of the conditions in the checks are evaluated, allowing any user to use the test command and ignoring the `0 == 1`
No exceptions are raised

### Intents

discord.Intents.all()

### System Information

- Python v3.10.0-final
- py-cord v2.0.0-beta
    - py-cord pkg_resources: v2.0.0b1
- aiohttp v3.8.1
- system info: Windows 10 10.0.19042

### 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

Adding checks to individual commands does work, but I want to apply checks to the entire group rather than having to write the same checks for each command individually. 


Discussion:

Resolving patch:
diff --git a/discord/commands/core.py b/discord/commands/core.py
--- a/discord/commands/core.py
+++ b/discord/commands/core.py
@@ -317,6 +317,10 @@ async def can_run(self, ctx: ApplicationContext) -> bool:
             raise CheckFailure(f"The global check functions for command {self.name} failed.")
 
         predicates = self.checks
+        if self.parent is not None:
+            # parent checks should be ran first
+            predicates = self.parent.checks + predicates
+
         if not predicates:
             # since we have no checks, then we just return True.
             return True
@@ -896,7 +900,7 @@ def __init__(
         self.subcommands: List[Union[SlashCommand, SlashCommandGroup]] = self.__initial_commands__
         self.guild_ids = guild_ids
         self.parent = parent
-        self.checks = []
+        self.checks = kwargs.get("checks", [])
 
         self._before_invoke = None
         self._after_invoke = None


Test patch: