Fix macro usage in DMs (#75)
This commit is contained in:
parent
04add0f364
commit
96016ae7f0
1 changed files with 2 additions and 6 deletions
|
@ -1,5 +1,3 @@
|
|||
from typing import Optional
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from discord.ext.commands import Cog, Context, BucketType, Greedy
|
||||
|
@ -21,11 +19,9 @@ class Macro(Cog):
|
|||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.cooldown(3, 30, BucketType.member)
|
||||
@commands.cooldown(3, 30, BucketType.user)
|
||||
@commands.command(aliases=["m"])
|
||||
async def macro(
|
||||
self, ctx: Context, key: str, targets: Greedy[discord.Member] = None
|
||||
):
|
||||
async def macro(self, ctx: Context, key: str, targets: Greedy[discord.User] = None):
|
||||
await ctx.message.delete()
|
||||
if len(key) > 0:
|
||||
text = get_macro(self.bot, key)
|
||||
|
|
Loading…
Reference in a new issue