mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user