Skip to content

Commit 76a0729

Browse files
Fix parameter names
1 parent c5aa18d commit 76a0729

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cogs/add_users_to_threads_and_channels.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async def on_thread_create(self, thread: discord.Thread) -> None:
177177
input_type=str,
178178
autocomplete=discord.utils.basic_autocomplete(autocomplete_get_members), # type: ignore[arg-type]
179179
required=True,
180-
parameter_name="user_or_role",
180+
parameter_name="user_id_str",
181181
)
182182
@discord.option( # type: ignore[no-untyped-call, misc]
183183
name="silent",
@@ -245,7 +245,7 @@ async def add_user_to_channel( # type: ignore[misc]
245245
input_type=str,
246246
autocomplete=discord.utils.basic_autocomplete(autocomplete_get_roles), # type: ignore[arg-type]
247247
required=True,
248-
parameter_name="user_or_role",
248+
parameter_name="role_id_str",
249249
)
250250
@discord.option( # type: ignore[no-untyped-call, misc]
251251
name="silent",
@@ -257,7 +257,7 @@ async def add_user_to_channel( # type: ignore[misc]
257257
async def add_role_to_channel( # type: ignore[misc]
258258
self,
259259
ctx: "TeXBotApplicationContext",
260-
role: str,
260+
role_id_str: str,
261261
silent: bool, # noqa: FBT001
262262
) -> None:
263263
"""Command to add a role to a channel."""
@@ -274,10 +274,10 @@ async def add_role_to_channel( # type: ignore[misc]
274274
main_guild: discord.Guild = ctx.bot.main_guild
275275

276276
try:
277-
role_id: int = int(role)
277+
role_id: int = int(role_id_str)
278278
except ValueError:
279-
logger.debug("Role ID: %s is not a valid ID.", role)
280-
await ctx.respond(content=f"The role: {role} is not valid.")
279+
logger.debug("Role ID: %s is not a valid ID.", role_id_str)
280+
await ctx.respond(content=f"The role: {role_id_str} is not valid.")
281281
return
282282

283283
role_object: discord.Role | None = discord.utils.get(main_guild.roles, id=role_id)

0 commit comments

Comments
 (0)