Skip to content

ItsKas/dpycooldowns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dpycooldowns is easy to use, simply create a cooldown manager, then create a cooldown with the manager as an argument. To make a cooldown, see below

cooldown = Cooldown.DpyCooldown(cooldownmanager, ctx, time)
import discord
from discord.ext import commands
from cooldown import Cooldown

bot = commands.Bot(command_prefix="prefix")
cooldownmanager = Cooldown.CooldownManager("mongodb connection string", "mongodb database", "mongodb collection")
@bot.command()
async def test(ctx):

    cooldown = Cooldown.DpyCooldown(cooldownmanager, ctx, 1)
    if not cooldown.is_done:
        return await ctx.send(f"You cannot use this command for another {cooldown.tostr}")
    await ctx.send("Test")

bot.run("token")

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages