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 cast, Iterable, Union, Literal
import discord
from redbot.core import Config, bank, commands, errors, checks
from redbot.core import Config, bank, commands, errors
from redbot.core.commands.converter import TimedeltaConverter
from redbot.core.bot import Red
from redbot.core.i18n import Translator, cog_i18n
@@ -237,7 +237,7 @@ class Economy(commands.Cog):
)
@bank.is_owner_if_bank_global()
@checks.admin_or_permissions(manage_guild=True)
@commands.admin_or_permissions(manage_guild=True)
@_bank.command(name="set")
async def _set(self, ctx: commands.Context, to: discord.Member, creds: SetParser):
"""Set the balance of a user's bank account.
@@ -656,7 +656,7 @@ class Economy(commands.Cog):
@guild_only_check()
@bank.is_owner_if_bank_global()
@checks.admin_or_permissions(manage_guild=True)
@commands.admin_or_permissions(manage_guild=True)
@commands.group()
async def economyset(self, ctx: commands.Context):
"""Base command to manage Economy settings."""