Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bot/exts/info/doc/_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pydis_core.utils.scheduling import Scheduler

from bot.bot import Bot
from bot.constants import MODERATION_ROLES, RedirectOutput
from bot.constants import MODERATION_ROLES, RedirectOutput, Roles
from bot.converters import Inventory, PackageName, ValidURL
from bot.log import get_logger
from bot.pagination import LinePaginator
Expand Down Expand Up @@ -349,7 +349,7 @@ def base_url_from_inventory_url(inventory_url: str) -> str:
return inventory_url.removesuffix("/").rsplit("/", maxsplit=1)[0] + "/"

@docs_group.command(name="setdoc", aliases=("s",))
@commands.has_any_role(*MODERATION_ROLES)
@commands.has_any_role(*MODERATION_ROLES, Roles.core_developers)
@lock(NAMESPACE, COMMAND_LOCK_SINGLETON, raise_error=True)
async def set_command(
self,
Expand Down Expand Up @@ -397,7 +397,7 @@ async def set_command(
await ctx.send(f"Added the package `{package_name}` to the database and updated the inventories.")

@docs_group.command(name="deletedoc", aliases=("removedoc", "rm", "d"))
@commands.has_any_role(*MODERATION_ROLES)
@commands.has_any_role(*MODERATION_ROLES, Roles.core_developers)
@lock(NAMESPACE, COMMAND_LOCK_SINGLETON, raise_error=True)
async def delete_command(self, ctx: commands.Context, package_name: PackageName) -> None:
"""
Expand All @@ -414,7 +414,7 @@ async def delete_command(self, ctx: commands.Context, package_name: PackageName)
await ctx.send(f"Successfully deleted `{package_name}` and refreshed the inventories.")

@docs_group.command(name="refreshdoc", aliases=("rfsh", "r"))
@commands.has_any_role(*MODERATION_ROLES)
@commands.has_any_role(*MODERATION_ROLES, Roles.core_developers)
@lock(NAMESPACE, COMMAND_LOCK_SINGLETON, raise_error=True)
async def refresh_command(self, ctx: commands.Context) -> None:
"""Refresh inventories and show the difference."""
Expand All @@ -436,7 +436,7 @@ async def refresh_command(self, ctx: commands.Context) -> None:
await ctx.send(embed=embed)

@docs_group.command(name="cleardoccache", aliases=("deletedoccache",))
@commands.has_any_role(*MODERATION_ROLES)
@commands.has_any_role(*MODERATION_ROLES, Roles.core_developers)
async def clear_cache_command(
self,
ctx: commands.Context,
Expand Down