From 9a861f39dd83a599d059cc3af4b0f1299125b856 Mon Sep 17 00:00:00 2001 From: Bobloy Date: Mon, 8 Jan 2018 13:44:05 -0500 Subject: [PATCH] Challonge cog initial commit --- challonge/__init__.py | 5 +++++ challonge/challonge.py | 44 ++++++++++++++++++++++++++++++++++++++++++ challonge/info.json | 11 +++++++++++ 3 files changed, 60 insertions(+) create mode 100644 challonge/__init__.py create mode 100644 challonge/challonge.py create mode 100644 challonge/info.json diff --git a/challonge/__init__.py b/challonge/__init__.py new file mode 100644 index 0000000..a1e7e01 --- /dev/null +++ b/challonge/__init__.py @@ -0,0 +1,5 @@ +from .challonge import Challonge + +def setup(bot): + n = Challonge(bot) + bot.add_cog(n) \ No newline at end of file diff --git a/challonge/challonge.py b/challonge/challonge.py new file mode 100644 index 0000000..e4aa2e2 --- /dev/null +++ b/challonge/challonge.py @@ -0,0 +1,44 @@ +import os + +import challonge + +import discord +from discord.ext import commands + +from redbot.core.utils.chat_formatting import pagify +from redbot.core.utils.chat_formatting import box +from redbot.core import Config +from redbot.core import checks + + + + +class Challonge: + """Cog for organizing Challonge tourneys""" + + def __init__(self, bot): + self.bot = bot + self.config = Config.get_conf(self, identifier=6710497108108111110103101) + default_global = { + "srtracker": {} + } + default_guild = { + "current": None, + } + + self.config.register_global(**default_global) + self.config.register_guild(**default_guild) + + + +# ************************Fight command group start************************ + + + @commands.group() + @commands.guild_only() + async def challonge(self, ctx): + """Challonge command base""" + if ctx.invoked_subcommand is None: + await ctx.send_help() + # await ctx.send("I can do stuff!") + diff --git a/challonge/info.json b/challonge/info.json new file mode 100644 index 0000000..a20a422 --- /dev/null +++ b/challonge/info.json @@ -0,0 +1,11 @@ +{ + "author" : ["Bobloy"], + "bot_version" : [3,0,0], + "description" : "[Incomplete] Cog to organize tournaments within Discord using Challonge", + "hidden" : false, + "install_msg" : "Thank you for installing the Challonge Cog.", + "required_cogs" : [], + "requirements" : ["challonge", "iso8601"], + "short" : "[Incomplete] Cog to organize Challonge tournaments", + "tags" : ["game", "fun", "fight", "tournament", "tourney", "challonge", "elimination", "bracket", "bobloy"] +} \ No newline at end of file