
    cjh)                        d Z ddlZddlZddlZddlZddlmZ ddlm	Z	 ddl
Z
ddlZddZddZdZd	Zd
ZdZddddddddZej'                  d  ed      D               ej-                  e      ZdddefdZddZddZdej6                  ddfdZdej6                  ddfdZde	ej<                  ej>                  f   fdZ ddZ!e"dk(  r e!        yy)ae  
The MIT License (MIT)

Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Pycord Development

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
    N)Path)Tuplereturnc                     dj                  t        j                        g} t        j                  }| j	                  dj                  |             |j
                  dk7  r5t        j                  j                  d      }|r| j	                  d|        | j	                  dt        j                          t        j                         }| j	                  dj                  |             t        dj                  |              y )	Nz8- Python v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}z9- py-cord v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}finalzpy-cordz#    - py-cord importlib.metadata: vz- aiohttp vz1- system info: {0.system} {0.release} {0.version}
)formatsysversion_infodiscordappendreleaselevel	importlibmetadataversionaiohttp__version__platformunameprintjoin)entriesr   r   r   s       C/var/www/html/venv/lib/python3.12/site-packages/discord/__main__.pyshow_versionr   &   s    BII	
G ''LNNCJJ<X   G+$$,,Y7NN@	JKNN[!4!4 567NNENNFMMeTU	$))G
    c                 2    |j                   rt                y y N)r   r   parserargss     r   corer!   <   s    || r   a{  #!/usr/bin/env python3

from discord.ext import commands
import discord
import config

class Bot(commands.{base}):
    def __init__(self, **kwargs):
        super().__init__(command_prefix=commands.when_mentioned_or('{prefix}'), **kwargs)
        for cog in config.cogs:
            try:
                self.load_extension(cog)
            except Exception as exc:
                print(f'Could not load extension {{cog}} due to {{exc.__class__.__name__}}: {{exc}}')

    async def on_ready(self):
        print(f'Logged on as {{self.user}} (ID: {{self.user.id}})')


bot = Bot()

# write general commands here

bot.run(config.token)
a   # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Our configuration files
config.py
zfrom discord.ext import commands
import discord

class {name}(commands.Cog{attrs}):
    """The description for {name} goes here."""

    def __init__(self, bot):
        self.bot = bot
{extra}
def setup(bot):
    bot.add_cog({name}(bot))
a  
    def cog_unload(self):
        # clean up logic goes here
        pass

    async def cog_check(self, ctx):
        # checks that apply to every command in here
        return True

    async def bot_check(self, ctx):
        # checks that apply to every command to the bot
        return True

    async def bot_check_once(self, ctx):
        # check that apply to every command but is guaranteed to be called only once
        return True

    async def cog_command_error(self, ctx, error):
        # error handling to every command in here
        pass

    async def cog_before_invoke(self, ctx):
        # called before a command is called here
        pass

    async def cog_after_invoke(self, ctx):
        # called after a command is called here
        pass

-)<>:"|?*c              #   6   K   | ]  }t        |      d f  y wr   )chr).0is     r   	<genexpr>r.      s     5aCFD>5s       F)replace_spacesc                   t        |t              r|S t        j                  dk(  r3d}t	        |      dk  r#|j                         |v r| j                  d       |j                  t              }|r|j                  dd      }t        |      S )Nwin32)CONPRNAUXNULCOM1COM2COM3COM4COM5COM6COM7COM8COM9LPT1LPT2LPT3LPT4LPT5LPT6LPT7LPT8LPT9   z1invalid directory name given, use a different one r"   )

isinstancer   r
   r   lenuppererror	translate_translation_tablereplace)r   namer0   	forbiddens       r   to_pathrT      sw    $
||w
	0 t9>djjli7LLLM>>,-D||C%:r   c                    t        | |j                        t        | |j                        z  }	 |j                  dd       |dz  }	 |j                  d       |dz  }|j                          	 t        t        |d	z        d
d      5 }|j                  d       d d d        	 t        t        |dz        d
d      5 }|j                  sdnd}|j                  t        j                  ||j                               d d d        |j                  s9	 t        t        |dz        d
d      5 }|j                  t                d d d        t        d|       y # t        $ r }| j                  d| d       Y d }~<d }~ww xY w# t        $ r}t        d| d       Y d }~5d }~ww xY w# 1 sw Y   xY w# t        $ r }| j                  d| d       Y d }~9d }~ww xY w# 1 sw Y   xY w# t        $ r }| j                  d| d       Y d }~d }~ww xY w# 1 sw Y   xY w# t        $ r}t        d| d       Y d }~d }~ww xY w)NT)exist_okparentsz$could not create our bot directory ()cogsrV   z__init__.py*warning: could not create cogs directory (z	config.pywutf-8encodingz*token = "place your token here"
cogs = []
zcould not create config file (zbot.pyBotAutoShardedBot)baseprefixzcould not create bot file (z
.gitignorez+warning: could not create .gitignore file (zsuccessfully made bot at)rT   	directoryrR   mkdirOSErrorrN   touchr   openstrwritesharded_bot_templater	   rc   no_git_gitignore_template)r   r    new_directoryexcrY   initfprb   s           r   newbotrs      s:   FDNN3gfdii6PPMDT48 6!DC

D
!m#

>#mk12C'J 	EbHHCD	E
;#mh./wG 	J2 $52BDHH]))tDKK)HI	J ;;	Hc-,67wO .SU,-.
 

$m4A  D;C5BCCD  C:3%qABBC	E 	E >5cU!<==>	J 	J  ;23%q9::;
. . 	H?uAFGG	Hs   E 'F 0F9 
F,F9 %G1 ?AG% G1 H) /HH) 	F#E>>F	F)F$$F),F61F9 9	G"GG"%G.*G1 1	H:HHH&"H) )	I2IIc                    t        | |j                        }	 |j                  d       |t        | |j
                        z  }|j                  d      }	 t        t        |      dd      5 }d	}|j                  rt        nd	}|j                  r|j                  }nst        |j                        }d
|v sd|v rFt        j                  dd      }	|j                  |	      j                         j!                  dd	      }n|j                         }|j"                  r|d|j"                   dz  }|j$                  r|dz  }|j'                  t(        j+                  |||             d d d        t	        d|       y # t        $ r}t	        d| d       Y d }~od }~ww xY w# 1 sw Y   <xY w# t        $ r}| j-                  d| d       Y d }~y d }~ww xY w)NTrZ   r[   rX   z.pyr\   r]   r^    r"   _z-_z  rJ   z, name="r&   z!, command_attrs=dict(hidden=True))rR   extraattrszsuccessfully made cog atzcould not create cog file ()rT   rd   re   rf   r   rR   with_suffixrh   ri   full_cog_extras
class_namestem	maketransrO   titlerQ   display_namehide_commandsrj   _cog_templater	   rN   )
r   r    cog_dirrp   rd   rr   rx   rw   rR   translations
             r   newcogr     s   fdnn-GCt$ '&$))44I%%e,I5#i.#8 	PBE#'99K"E9>>*$;#+"%--d";K>>+6<<>FFsBOD::<D  8D$5$5#6a88!!<<HH]))t5)NO#	P* 	()47  C:3%qABBC	P 	P$  ;23%q9::;sH   E; F- ,C:F!&F- ;	FFF!F*&F- -	G6GG	subparserc                 F   | j                  dd      }|j                  t               |j                  dd       |j                  ddd	t	        j
                         
       |j                  dddd       |j                  ddd       |j                  dddd       y )Nrs   z%creates a command bot project quicklyhelpfuncrR   zthe bot project namerd   z)the directory to place it in (default: .)r(   r   nargsdefaultz--prefixzthe bot prefix (default: $)$z<prefix>)r   r   metavarz	--shardedzwhether to use AutoShardedBot
store_truer   actionz--no-gitzdo not create a .gitignore filerm   )r   r   dest)
add_parserset_defaultsrs   add_argumentr   cwdr   r   s     r   add_newbot_argsr   -  s    !!> " F V$
%;<
8
	   6Z   9,   .	  r   c                 V   | j                  dd      }|j                  t               |j                  dd       |j                  ddd	t	        d
             |j                  ddd       |j                  dd       |j                  ddd       |j                  ddd       y )Nr   z"creates a new cog template quicklyr   r   rR   zthe cog namerd   z,the directory to place it in (default: cogs)r(   rY   r   z--class-namez+the class name of the cog (default: <name>)r|   )r   r   z--display-namezthe cog name (default: <name>)z--hide-commandsz'whether to hide all commands in the cogr   r   z--fullzadd all special methods as well)r   r   r   r   r   r   s     r   add_newcog_argsr   H  s    !!(1U!VF
V$
^4
;V	   :  
 (/OP
6  
 8  r   c                      t        j                  dd      } | j                  dddd       | j                  t        	       | j                  d
d      }t        |       t        |       | | j                         fS )Nr   zTools for helping with Pycord)progdescriptionz-vz	--versionr   zshows the library version)r   r   r   
subcommandsubcommands)r   r   )	argparseArgumentParserr   r   r!   add_subparsersr   r   
parse_args)r   r   s     r   r   r   c  s    $$$CF k,5P   T"%%<}%MIII6$$&&&r   c                  B    t               \  } }|j                  | |       y r   )r   r   r   s     r   mainr   r  s    <LFDIIfdr   __main__)r   N)#__doc__r   importlib.metadatar   r   r
   pathlibr   typingr   r   r   r   r!   rl   rn   r   r{   _base_tableupdaterangeri   r~   rP   rT   rs   r   _SubParsersActionr   r   r   	Namespacer   r   __name__ r   r   <module>r      s   2    
    ,
4 <H 
			 
		
   5595 5]];/  -2 #d #L'5T5Dx99 d 6x99 d 6'E(1183E3EEF '
 zF r   