
    Pj	-                    b   U d Z ddlmZ ddlmZmZmZ ddlZddlZddl	m
Z
mZmZ ddlZddl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ded<   ej5                  d  ed      D               ej;                  e      ZddddZddZ ddZ!ddZ"ddZ#d dZ$ddZ%e&dk(  r e%        yy)!a:  
The MIT License (MIT)

Copyright (c) 2015-present Rapptz

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.
    )annotations)OptionalTupleDictN)PathPurePathPureWindowsPathc                    g } | j                  dj                  t        j                               t        j                  }| j                  dj                  |             |j
                  dk7  r5t        j                  j                  d      }|r| j                  d|        | j                  dt        j                          	 dd l}| j                  d|j                          t        j                         }| j                  d
j                  |             t        dj!                  |              y # t        $ r | j                  d	       Y kw xY w)Nz8- Python v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}z<- discord.py v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}finalz
discord.pyz    - discord.py metadata: vz- aiohttp vr   z	- davey vz- davey not foundz1- system info: {0.system} {0.release} {0.version}
)appendformatsysversion_infodiscordreleaselevel	importlibmetadataversionaiohttp__version__daveyImportErrorplatformunameprintjoin)entriesr   r   r   r   s        C/root/.hermes/venv/lib/python3.12/site-packages/discord/__main__.pyshow_versionr    '   s   GNNMTTUXUeUefg''LNNQXXYefg  G+$$,,\:NN9'CDNN[!4!4 5678 	5#4#4"567NNENNFMMeTU	$))G
  ,*+,s   D9 9EEc                R    |j                   rt                y | j                          y N)r   r    
print_helpparserargss     r   corer'   @   s    ||    a  #!/usr/bin/env python3

from discord.ext import commands
import discord
import config

class Bot(commands.{base}):
    def __init__(self, intents: discord.Intents, **kwargs):
        super().__init__(command_prefix=commands.when_mentioned_or('{prefix}'), intents=intents, **kwargs)

    async def setup_hook(self):
        for cog in config.cogs:
            try:
                await 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}})')


intents = discord.Intents.default()
intents.message_content = True
bot = Bot(intents=intents)

# 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}
async def setup(bot):
    await bot.add_cog({name}(bot))
a  
    async def cog_load(self):
        # loading logic goes here
        pass

    async 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_app_command_error(self, interaction, error):
        # error handling to every application 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

-)<>:"|?*zDict[str, Optional[str]]_base_tablec              #  6   K   | ]  }t        |      d f  y wr"   )chr).0is     r   	<genexpr>r6      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       t        |      }t        |t              rU|j                  rI|j                  d   |j                  dd  }}t        t        d |            }|dj                  |      z   }n|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 oner      c                ,    | j                  t              S r"   )	translate_translation_table)ps    r   <lambda>zto_path.<locals>.<lambda>   s    !++6H*I r(   \ r)   )
isinstancer   r   r   lenuppererrorr   r	   drivepartstuplemapr   rT   rU   replace)r%   namer8   	forbiddenpathr^   resttransformeds           r   to_pathrh      s    $
||w
	0 t9>djjli7LLLMD>D$(TZZjjmTZZ^tC I4PQtyy-- ~~01||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rj   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)rh   	directoryrc   mkdirOSErrorr]   touchr   openstrwritesharded_bot_templater   rw   no_git_gitignore_template)r%   r&   new_directoryexcrm   initfprv   s           r   newbotr      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)NTrn   ro   rl   z.pyrp   rq   rr    r)   _z-_z  rY   z, name="r-   z!, command_attrs=dict(hidden=True))rc   extraattrszsuccessfully made cog atzcould not create cog file ()rh   rx   ry   rz   r   rc   with_suffixr|   r}   full_cog_extras
class_namestem	maketransrT   titlerb   display_namehide_commandsr~   _cog_templater   r]   )
r%   r&   cog_dirr   rx   r   r   r   rc   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c                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 )Nr   z%creates a command bot project quicklyhelpfuncrc   zthe bot project namerx   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 filer   )r   r   dest)
add_parserset_defaultsr   add_argumentr   cwd	subparserr%   s     r   add_newbot_argsr   E  s    !!(1X!YF
V$
%;<
*U]`jnjrjrjtu

)FPS]gh
*IR^_

)JS_fnor(   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   rc   zthe cog namerx   z,the directory to place it in (default: cogs)r/   rm   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   P  s    !!(1U!VF
V$
^4
*X`cmqrxmyz
-Zamn
(/OP
)0Ybno
'HQ]^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 discord.py)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   \  sw    $$)AdeF
k,E`a
T"%%<}%MIII6$$&&&r(   c                 B    t               \  } }|j                  | |       y r"   )r   r   r$   s     r   mainr   g  s    <LFDIIfdr(   __main__)returnNone)r%   argparse.ArgumentParserr&   zargparse.Namespacer   r   )r%   r   rc   r}   r8   boolr   r   )r   z3argparse._SubParsersAction[argparse.ArgumentParser]r   r   )r   z2Tuple[argparse.ArgumentParser, argparse.Namespace])'__doc__
__future__r   typingr   r   r   r   r   pathlibr   r   r	   r   importlib.metadatar   r   r   r    r'   r   r   r   r   r1   __annotations__updateranger}   r   rU   rh   r   r   r   r   r   r   __name__ r(   r   <module>r      s   0 # ( (  
 3 3    2< <%X 
			 
		
)% 
   5595 5]];/  SX )X'5T5Dp	_'
 zF r(   