aboutsummaryrefslogtreecommitdiff
path: root/question_of_the_day
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-02-11 00:53:39 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-02-11 00:53:39 +0000
commitb71b26cf9b32715dd503931180f9c671ba609241 (patch)
tree83682d42f571ba8df6990cdb2e3c8293422e1aa8 /question_of_the_day
parent671640258c4690bf78ec636ab66084d8bd13631d (diff)
downloadaps-cogs-b71b26cf9b32715dd503931180f9c671ba609241.tar
aps-cogs-b71b26cf9b32715dd503931180f9c671ba609241.tar.gz
aps-cogs-b71b26cf9b32715dd503931180f9c671ba609241.zip
Restoring previous functionality
Diffstat (limited to 'question_of_the_day')
-rw-r--r--question_of_the_day/question_of_the_day.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/question_of_the_day/question_of_the_day.py b/question_of_the_day/question_of_the_day.py
index bbbad9d..82c7797 100644
--- a/question_of_the_day/question_of_the_day.py
+++ b/question_of_the_day/question_of_the_day.py
@@ -102,7 +102,7 @@ class QuestionOfTheDay(commands.Cog):
pass
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def add(self, ctx, *, question: str):
"""
Add a question directly to the main queue (requires elevated permissions).
@@ -132,7 +132,7 @@ class QuestionOfTheDay(commands.Cog):
await ctx.reply("No questions yet.")
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def remove(self, ctx, question_id: int):
"""
Remove a question from the queue using its id (see `qotd list`).
@@ -145,7 +145,7 @@ class QuestionOfTheDay(commands.Cog):
await ctx.reply(f"Error: no question with id {question_id}.")
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def post(self, ctx):
"""
Post a question immediately.
@@ -163,7 +163,7 @@ class QuestionOfTheDay(commands.Cog):
)
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def post_at(self, ctx, hour_after_midnight_utc: int, minute_after_hour: int):
"""Set the time to post a QOTD every day in this server."""
if (
@@ -200,7 +200,7 @@ class QuestionOfTheDay(commands.Cog):
)
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def post_here(self, ctx):
"""
Set the current channel as where QOTDs should be posted.
@@ -212,7 +212,7 @@ class QuestionOfTheDay(commands.Cog):
await ctx.reply("Error: must use a text channel.")
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def toggle(self, ctx):
"""
Turn on or off automatic posting of questions of the day in this server.
@@ -267,7 +267,7 @@ class QuestionOfTheDay(commands.Cog):
await ctx.reply("No suggested questions yet.")
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def approve(self, ctx, suggestion_id: int | typing.Literal["all"]):
"""
Approve a suggestion using its id (see `qotd suggestions`).
@@ -320,7 +320,7 @@ class QuestionOfTheDay(commands.Cog):
)
@qotd.command()
- @commands.admin()
+ @commands.admin_or_permissions(manage_guild=True)
async def deny(self, ctx, suggestion_id: int):
"""
Decline a suggestion and remove it from the suggestion queue.