mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-22 19:55:46 +00:00
Fix macro usage in DMs (#75)
This commit is contained in:
parent
04add0f364
commit
96016ae7f0
|
@ -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