Giter Club home page Giter Club logo

Comments (5)

calebj avatar calebj commented on June 19, 2024

from calebj-cogs.

CRASNY avatar CRASNY commented on June 19, 2024

Thanks for the really fast reply. Maybe you can help me understand cooldowns actually, since I haven't found that in documentation.

@commands.cooldown(1, 60, commands.BucketType.user)
I know the 60 represents a minute cooldown, but what is the 1? If I change that to 2, it will allow 2 per 60 seconds, or?

from calebj-cogs.

calebj avatar calebj commented on June 19, 2024

from calebj-cogs.

CRASNY avatar CRASNY commented on June 19, 2024

Thanks for the help. I managed to fix this by commenting out this line in red.py:

            #await bot.send_message(channel, error)
            await bot.send_message(channel, "This command is on cooldown. "
                                            "Try again in {:.2f} seconds."
                                            "".format(error.retry_after))

I'm not sure why it was performing both of these sends, and not entirely sure of the consequences to other cogs in commenting that out, but at least Duels works better now.

One more unrelated question though, I'm noticing after the fifth message that's sent it's as if the bot gets throttled and it pauses for a moment before continuing to output duel results. Do you know why that is?

from calebj-cogs.

calebj avatar calebj commented on June 19, 2024

That looks like a modified version of red.py; the mainline version doesn't have two send_messages.

In any case, this is a Red issue and not with my cogs specifically. I think you should git reset your red.py to match the maintained version, or more things are bound to break.

from calebj-cogs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.