Use the commands module instead of checks for permission decorators (#5463)

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
This commit is contained in:
Kreusada
2023-04-13 19:16:12 +01:00
committed by GitHub
parent a70f444255
commit 79d11e947c
35 changed files with 238 additions and 249 deletions

View File

@@ -9,7 +9,7 @@ from typing import Tuple, Union, Iterable, Collection, Optional, Dict, Set, List
from collections import defaultdict
import discord
from redbot.core import checks, commands, Config, version_info as red_version_info
from redbot.core import commands, Config, version_info as red_version_info
from redbot.core.bot import Red
from redbot.core.data_manager import cog_data_path
from redbot.core.i18n import Translator, cog_i18n
@@ -480,7 +480,7 @@ class Downloader(commands.Cog):
await target.send(page)
@commands.command(require_var_positional=True)
@checks.is_owner()
@commands.is_owner()
async def pipinstall(self, ctx: commands.Context, *deps: str) -> None:
"""
Install a group of dependencies using pip.
@@ -514,7 +514,7 @@ class Downloader(commands.Cog):
)
@commands.group()
@checks.is_owner()
@commands.is_owner()
async def repo(self, ctx: commands.Context) -> None:
"""Base command for repository management."""
pass
@@ -698,7 +698,7 @@ class Downloader(commands.Cog):
await self.send_pagified(ctx, message)
@commands.group()
@checks.is_owner()
@commands.is_owner()
async def cog(self, ctx: commands.Context) -> None:
"""Base command for cog installation management commands."""
pass