diff --git a/chatchart/chatchart.py b/chatchart/chatchart.py index d843da8..0aa9749 100644 --- a/chatchart/chatchart.py +++ b/chatchart/chatchart.py @@ -7,6 +7,7 @@ import discord import heapq import os from io import BytesIO +from typing import Optional import matplotlib matplotlib.use("agg") @@ -79,7 +80,8 @@ class Chatchart(commands.Cog): @commands.guild_only() @commands.command() @commands.cooldown(1, 10, commands.BucketType.channel) - async def chatchart(self, ctx, channel: discord.TextChannel = None, messages=5000): + @commands.max_concurrency(1, commands.BucketType.channel) + async def chatchart(self, ctx, channel: Optional[discord.TextChannel] = None, messages=5000): """ Generates a pie chart, representing the last 5000 messages in the specified channel. """