From 96016ae7f072917d9f3f4db59f83d49425b6f25a Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Mon, 9 Oct 2023 22:53:57 +0200 Subject: [PATCH] Fix macro usage in DMs (#75) --- robocop_ng/cogs/macro.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/robocop_ng/cogs/macro.py b/robocop_ng/cogs/macro.py index 413161c..6fe598a 100644 --- a/robocop_ng/cogs/macro.py +++ b/robocop_ng/cogs/macro.py @@ -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)