mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
Cleanup
This commit is contained in:
parent
5b7fb2deba
commit
5ab80712d0
6 changed files with 45 additions and 36 deletions
|
@ -3,7 +3,8 @@ from __future__ import annotations
|
|||
from datetime import timedelta as TimeDelta
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from discord.ext.commands import Cog, command, has_permissions
|
||||
from discord.ext import commands
|
||||
from discord.ext.commands import Cog, command
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from discord import Member
|
||||
|
@ -27,7 +28,7 @@ class Moderation(Cog):
|
|||
brief="Times out a user.",
|
||||
help="Times out a user."
|
||||
)
|
||||
@has_permissions(manage_messages=True)
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def timeout(self, ctx: Context, member: Member, duration: str = "1d") -> None:
|
||||
if duration[-1] not in self.time_values or len(duration) < 2:
|
||||
await ctx.reply("Invalid duration. Valid durations are: d, h, m, s.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue