[TrickOrTreat] cooldown -> totcooldown
This commit is contained in:
@@ -6,16 +6,10 @@ from redbot.core import commands, checks, Config, bank
|
||||
from redbot.core.utils.chat_formatting import box, pagify
|
||||
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
|
||||
|
||||
__version__ = "0.0.5"
|
||||
BaseCog = getattr(commands, "Cog", object)
|
||||
__version__ = "0.0.6"
|
||||
|
||||
listener = getattr(commands.Cog, "listener", None) # Trusty + Sinbad
|
||||
if listener is None:
|
||||
|
||||
def listener(name=None):
|
||||
return lambda x: x
|
||||
|
||||
class TrickOrTreat(BaseCog):
|
||||
class TrickOrTreat(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, 2710311393, force_registration=True)
|
||||
@@ -240,7 +234,7 @@ class TrickOrTreat(BaseCog):
|
||||
@commands.guild_only()
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
@commands.command()
|
||||
async def cooldown(self, ctx, cooldown_time: int = 0):
|
||||
async def totcooldown(self, ctx, cooldown_time: int = 0):
|
||||
"""Set the cooldown time for trick or treating on the server."""
|
||||
cooldown = await self.config.guild(ctx.guild).cooldown()
|
||||
if not cooldown_time:
|
||||
@@ -425,10 +419,10 @@ class TrickOrTreat(BaseCog):
|
||||
async def totversion(self, ctx):
|
||||
"""Trick or Treat version."""
|
||||
await ctx.send(
|
||||
f"Trick or Treat, version {__version__}\n\n*0.0.5 updates:*\n**Save values before waiting on messages:\nQuick commands will not overwrite other values**\n\n*0.0.4 updates:*\n**+2% star chance on trick or treat (6% total)\n+5% lollipop chance on trick or treat (25% total)\nMore RP messages\nFix for steal mechanic freezing\n**"
|
||||
f"Trick or Treat, version {__version__}\n\n*0.0.6 updates:*\n**cooldown -> totcooldown\nGeneral cleanup for 2019**\n\n*0.0.5 updates:*\n**Save values before waiting on messages:\nQuick commands will not overwrite other values**\n\n*0.0.4 updates:*\n**+2% star chance on trick or treat (6% total)\n+5% lollipop chance on trick or treat (25% total)\nMore RP messages\nFix for steal mechanic freezing\n**"
|
||||
)
|
||||
|
||||
@listener()
|
||||
@commands.Cog.listener()
|
||||
async def on_message(self, message):
|
||||
if isinstance(message.channel, discord.abc.PrivateChannel):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user