20 lines
751 B
Python
20 lines
751 B
Python
from discord import Member, SlashCommandGroup, Option
|
|
from discord.ext.commands import Cog, cooldown, BucketType, command, has_permissions, bot_has_permissions, Context, guild_only, bot_has_guild_permissions, check
|
|
|
|
|
|
|
|
class CMail(Cog):
|
|
def __init__(self, bot):
|
|
self.bot = bot
|
|
|
|
MAIL = SlashCommandGroup(name="편지", description="편지를 보내거나 확인합니다.")
|
|
|
|
@MAIL.command(name="보내기", description="편지를 보냅니다.")
|
|
@cooldown(1, 10, BucketType.user)
|
|
@guild_only()
|
|
async def _send(self, ctx: Context, member: Option(Member, name="member", description="편지를 받을 사람을 선택해주세요.", required=True)):
|
|
|
|
|
|
|
|
def setup(bot):
|
|
bot.add_cog(CMail(bot)) |