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

@@ -4,7 +4,7 @@ from typing import Optional
import aiohttp
from redbot.core.i18n import Translator, cog_i18n
from redbot.core import checks, Config, commands
from redbot.core import Config, commands
from redbot.core.commands import UserInputOptional
_ = Translator("Image", __file__)
@@ -153,7 +153,7 @@ class Image(commands.Cog):
_("Something went wrong. Error code is {code}.").format(code=data["status"])
)
@checks.is_owner()
@commands.is_owner()
@commands.command()
async def imgurcreds(self, ctx):
"""Explain how to set imgur API tokens."""
@@ -228,7 +228,7 @@ class Image(commands.Cog):
else:
await ctx.send(_("Error contacting the API."))
@checks.is_owner()
@commands.is_owner()
@commands.command()
async def giphycreds(self, ctx):
"""Explains how to set GIPHY API tokens."""