Challonge cog initial commit
This commit is contained in:
		
							parent
							
								
									479325d5dc
								
							
						
					
					
						commit
						9a861f39dd
					
				
							
								
								
									
										5
									
								
								challonge/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								challonge/__init__.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
			
		||||
from .challonge import Challonge
 | 
			
		||||
 | 
			
		||||
def setup(bot):
 | 
			
		||||
    n = Challonge(bot)
 | 
			
		||||
    bot.add_cog(n)
 | 
			
		||||
							
								
								
									
										44
									
								
								challonge/challonge.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								challonge/challonge.py
									
									
									
									
									
										Normal file
									
								
							@ -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!")
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								challonge/info.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								challonge/info.json
									
									
									
									
									
										Normal file
									
								
							@ -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"]
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user