feat: Refactored all cogs implementation
Some checks failed
CI / Run tests (pull_request) Has been cancelled

This commit is contained in:
2026-09-12 23:16:43 +02:00
parent 505621e0cd
commit c86ea54e86
10 changed files with 451 additions and 123 deletions

View File

@@ -5,11 +5,12 @@ import random
import discord
from discord import option
from discord.ext import commands
from cogs import FeatureCog
class RouletteCog(commands.Cog):
class RouletteCog(FeatureCog):
def __init__(self, bot: discord.Bot):
self.bot = bot
super().__init__(bot, feature_name="roulette")
self.cooldown = 60 * 3
self.active_games = {}
@@ -155,6 +156,10 @@ class RouletteCog(commands.Cog):
ctx: discord.ApplicationContext,
target: discord.Member,
):
# ensure feature enabled for this guild
if not ctx.guild or not self.is_enabled(ctx.guild.id):
await ctx.respond("Roulette feature is disabled for this guild.", ephemeral=True)
return
author = ctx.author
self_test = author.id == target.id