Skip to content

Commit deb3a8f

Browse files
Add command checks to add_users and add_roles commands (#501)
1 parent 3585b17 commit deb3a8f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cogs/add_users_to_threads_and_channels.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from config import settings
1010
from exceptions import GuestRoleDoesNotExistError, GuildDoesNotExistError
11-
from utils import TeXBotBaseCog
11+
from utils import CommandChecks, TeXBotBaseCog
1212
from utils.error_capture_decorators import capture_guild_does_not_exist_error
1313

1414
if TYPE_CHECKING:
@@ -203,6 +203,8 @@ async def on_thread_create(self, thread: discord.Thread) -> None:
203203
required=False,
204204
parameter_name="silent",
205205
)
206+
@CommandChecks.check_interaction_user_has_committee_role
207+
@CommandChecks.check_interaction_user_in_main_guild
206208
async def add_user_to_channel( # type: ignore[misc]
207209
self,
208210
ctx: "TeXBotApplicationContext",
@@ -256,6 +258,8 @@ async def add_user_to_channel( # type: ignore[misc]
256258
required=False,
257259
parameter_name="silent",
258260
)
261+
@CommandChecks.check_interaction_user_has_committee_role
262+
@CommandChecks.check_interaction_user_in_main_guild
259263
async def add_role_to_channel( # type: ignore[misc]
260264
self,
261265
ctx: "TeXBotApplicationContext",

0 commit comments

Comments
 (0)