#TypeError: timeout() missing 1 required positional argument: 'time'
1 messages · Page 1 of 1 (latest)
You have it as not required, and it isn't set to for example time = 10, and time isn't even used
actually im dumb asf, in async def it should be time: int or whatever
That wouldn't fix it
the problem is that it isn't required, so if there is no time input it won't work
why in references instead of time= is communication_disabled_until
@slash_command(description="Timeout user for a certain time")
@slash_option(
name="user",
description="Ping a user",
required=True,
opt_type=OptionType.USER
)
@slash_option(
name="time",
description="Enter time in minutes",
required=False,
opt_type=OptionType.INTEGER
)
async def timeout(ctx: SlashContext, user: Member, time: int = 10):
await user.timeout(time, reason="kys")```
that should work
welp, theres actually new error
400|Bad Request: communication_disabled_until INVALID_COMMUNICATION_DISABLED_TIMESTAMP: Invalid communication disabled timestamp