fadmin and info update

howdoi
Bobloy 7 years ago
parent 3ec81f80c8
commit 479325d5dc

@ -197,12 +197,22 @@ class Fight:
"""Shows the full bracket""" """Shows the full bracket"""
await ctx.send("Todo Bracket Full") await ctx.send("Todo Bracket Full")
# **********************Fightset command group start*********************
@commands.group()
@commands.guild_only()
@checks.mod_or_permissions(administrator=True)
async def fadmin(self, ctx):
"""Admin command for managing the current tournament"""
if ctx.invoked_subcommand is None:
await ctx.send_help()
@fadmin.command(name="score")
async def fadmin_score(self, ctx, mID, score1, score2):
"""Set's the score for matchID and clears disputes"""
# **********************Fightset command group start********************* # **********************Fightset command group start*********************
# def fightsetdec(func):
# async def decorated(self, ctx, *args, **kwargs):
# guild = ctx.message.guild
# await func(self, ctx, guild, *args, **kwargs)
# return decorated
@commands.group(aliases=['setfight']) @commands.group(aliases=['setfight'])
@commands.guild_only() @commands.guild_only()
@ -873,11 +883,10 @@ class Fight:
theT["TYPEDATA"]["MATCHES"][mID]["SCORE1"] = theT["TYPEDATA"]["MATCHES"][mID]["USERSCORE1"]["SCORE1"] theT["TYPEDATA"]["MATCHES"][mID]["SCORE1"] = theT["TYPEDATA"]["MATCHES"][mID]["USERSCORE1"]["SCORE1"]
theT["TYPEDATA"]["MATCHES"][mID]["SCORE1"] = theT["TYPEDATA"]["MATCHES"][mID]["USERSCORE2"]["SCORE2"] theT["TYPEDATA"]["MATCHES"][mID]["SCORE1"] = theT["TYPEDATA"]["MATCHES"][mID]["USERSCORE2"]["SCORE2"]
await self._save_fight(ctx, tID, theT) await self._save_fight(ctx, tID, theT)
return True else:
await self._rr_report_dispute(guild, tID, mID)
await self._save_fight(ctx, tID, theT)
async def _rr_(self, guild: discord.Guild, tID, mID): async def _rr_(self, guild: discord.Guild, tID, mID):
"""Applies scores to all non-disputed matches""" """Applies scores to all non-disputed matches"""
theT = await self._getfight(guild, tID) theT = await self._getfight(guild, tID)

@ -1,9 +1,10 @@
{ {
"AUTHOR" : "Bobloy", "author" : ["Bobloy"],
"INSTALL_MSG" : "Thank you for installing Fight. Run with [p]fight or [p]fightset", "bot_version" : [3,0,0],
"NAME" : "Fight", "description" : "[Incomplete] Cog to organize tournaments within Discord",
"SHORT" : "[Incomplete] Cog to organize tournaments", "hidden" : false,
"DESCRIPTION" : "[Incomplete] Cog to organize tournaments within Discord", "install_msg" : "Thank you for installing Fight. Run with [p]fight or [p]fightset",
"TAGS" : ["game", "fun", "fight", "tournament", "tourney", "tourny", "elimination", "bracket", "fox", "bobloy"], "requirements" : [],
"HIDDEN" : false "short" : "[Incomplete] Cog to organize tournaments",
"tags" : ["game", "fun", "fight", "tournament", "tourney", "elimination", "bracket", "bobloy"]
} }
Loading…
Cancel
Save