Skip to content

Commit

Permalink
Misc improve
Browse files Browse the repository at this point in the history
  • Loading branch information
optimumtact committed Jul 10, 2024
1 parent 7e3b62b commit ab23c08
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion pet/pets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import discord

# Redbot Imports
from redbot.core import commands
from redbot.core import commands, checks
from datetime import timedelta, datetime

import logging
Expand All @@ -22,6 +22,7 @@

class Pets(BaseCog):
def __init__(self, bot):
self.loaded = False
self.bot = bot
self.timeout_minutes = 5
self.timebetween_timeouts = 10
Expand Down Expand Up @@ -960,6 +961,9 @@ async def roulette(self, ctx, *, name: str = None):
"""
are you feeling lucky, punk?
"""
# Quick disable
if not self.loaded:
return
self.cylinder += 1
# wrap around to 0 again
self.cylinder = self.cylinder % 6
Expand Down Expand Up @@ -1076,6 +1080,7 @@ async def sex(self, ctx, *, name: str = None):
await ctx.send(message)

@commands.command(aliases=["punish"])
@checks.mod_or_permissions(administrator=True)
async def roulette_upgrade(self, ctx, *, name: str = None):
"""
Make the roulette more dangerous by waiting longer between timeout periods
Expand All @@ -1086,3 +1091,18 @@ async def roulette_upgrade(self, ctx, *, name: str = None):
self.timebetween_timeouts = 10
message = f"Roulette will now only reset timer after {self.timebetween_timeouts} minutes"
await ctx.send(message)

@commands.command(aliases=["unloadgun"])
@checks.mod_or_permissions(administrator=True)
async def roulette_off(self, ctx, *, name: str = None):
"""
Disable the roulette command during spam periods
"""
# Invert control
self.loaded = not self.loaded
english = "unloaded"
if self.loaded:
english = "loaded"

message = f"Gun is now {english}"
await ctx.send(message)

0 comments on commit ab23c08

Please sign in to comment.