|
|
@ -1,4 +1,3 @@
|
|
|
|
import asyncio
|
|
|
|
|
|
|
|
import random
|
|
|
|
import random
|
|
|
|
|
|
|
|
|
|
|
|
from discord.ext import commands
|
|
|
|
from discord.ext import commands
|
|
|
@ -55,17 +54,6 @@ class OwOText(commands.Cog):
|
|
|
|
|
|
|
|
|
|
|
|
await ctx.message.channel.send(owo)
|
|
|
|
await ctx.message.channel.send(owo)
|
|
|
|
|
|
|
|
|
|
|
|
# Bot Event for handling cooldown error
|
|
|
|
|
|
|
|
@commands.Cog.listener()
|
|
|
|
|
|
|
|
async def on_command_error(self, ctx, error):
|
|
|
|
|
|
|
|
if isinstance(error, commands.CommandOnCooldown):
|
|
|
|
|
|
|
|
message = await ctx.send(f'That command is on cooldown. Try again in {error.retry_after:,.2f} seconds.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
|
|
|
|
await asyncio.sleep(2.5)
|
|
|
|
|
|
|
|
# Delete the message
|
|
|
|
|
|
|
|
await message.delete()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
def setup(bot):
|
|
|
|
bot.add_cog(OwOText(bot))
|
|
|
|
bot.add_cog(OwOText(bot))
|
|
|
|