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:
@@ -10,7 +10,7 @@ import io
|
||||
import yaml
|
||||
import discord
|
||||
|
||||
from redbot.core import Config, commands, checks, bank
|
||||
from redbot.core import Config, commands, bank
|
||||
from redbot.core.bot import Red
|
||||
from redbot.core.data_manager import cog_data_path
|
||||
from redbot.core.i18n import Translator, cog_i18n
|
||||
@@ -77,7 +77,7 @@ class Trivia(commands.Cog):
|
||||
|
||||
@commands.group()
|
||||
@commands.guild_only()
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
@commands.mod_or_permissions(administrator=True)
|
||||
async def triviaset(self, ctx: commands.Context):
|
||||
"""Manage Trivia settings."""
|
||||
|
||||
@@ -194,7 +194,7 @@ class Trivia(commands.Cog):
|
||||
await ctx.send(_("Alright, I won't reveal the answer to the questions anymore."))
|
||||
|
||||
@bank.is_owner_if_bank_global()
|
||||
@checks.admin_or_permissions(manage_guild=True)
|
||||
@commands.admin_or_permissions(manage_guild=True)
|
||||
@triviaset.command(name="payout")
|
||||
async def triviaset_payout_multiplier(self, ctx: commands.Context, multiplier: finite_float):
|
||||
"""Set the payout multiplier.
|
||||
|
||||
Reference in New Issue
Block a user