Skip to content

Commit

Permalink
add player cap command
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyjassin committed Dec 21, 2024
1 parent 0cff4bb commit 0955128
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions cogs/debugging.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import random
from bson import ObjectId

from discord import SlashCommandGroup
from discord import SlashCommandGroup, Option
from discord.ext import commands

from models.CustomMogiContext import MogiApplicationContext
from models.PlayerModel import PlayerProfile
from utils.data.mogi_manager import mogi_manager
from utils.data.state import state_manager
from utils.command_helpers.checks import is_admin, is_moderator, is_mogi_not_in_progress
from utils.command_helpers.checks import (
is_admin,
is_moderator,
is_mogi_manager,
is_mogi_not_in_progress,
)


class debugging(commands.Cog):
Expand Down Expand Up @@ -76,6 +81,16 @@ async def perms(self, ctx: MogiApplicationContext):
f"Mogi Manager role: {ctx.get_lounge_role('Mogi Manager').permissions.value}"
)

@debug.command(name="player_cap", description="change the player cap")
@is_mogi_manager()
async def player_cap(
self, ctx: MogiApplicationContext, cap: int = Option(int, "The new player cap")
):
ctx.mogi.player_cap = cap
await ctx.respond(
f"Updated the player cap for this mogi to {ctx.mogi.player_cap}"
)


def setup(bot: commands.Bot):
bot.add_cog(debugging(bot))

0 comments on commit 0955128

Please sign in to comment.