示例#1
0
文件: selfbot.py 项目: Fainn/selfbot1
 def __init__(self, **attrs):
     super().__init__(command_prefix=self.get_pre, self_bot=True)
     self.formatter = EmbedHelp()
     self.session = aiohttp.ClientSession(loop=self.loop)
     self.process = psutil.Process()
     self._extensions = [x.replace('.py', '') for x in os.listdir('cogs') if x.endswith('.py')]
     self.last_message = None
     self.messages_sent = 0
     self.commands_used = defaultdict(int)
     self.remove_command('help')
     self.load_extensions()
示例#2
0
文件: ghbot.py 项目: UC-c0de/ghbot.py
 def __init__(gh, **attrs):
     super().__init__(command_prefix=gh.get_pre, gh_bot=True)
     gh.formatter = EmbedHelp()
     gh.session = aiohttp.ClientSession(loop=gh.loop)
     gh.process = psutil.Process()
     gh.prefix = None
     gh._extensions = [
         x.replace('.py', '') for x in os.listdir('cogs')
         if x.endswith('.py')
     ]
     gh.last_message = None
     gh.messages_sent = 0
     gh.commands_used = defaultdict(int)
     gh.remove_command('help')
     gh.add_command(gh.ping)
     gh.load_extensions()
     gh.add_command(gh.load)
     gh.add_command(gh.reloadcog)
     gh.load_community_extensions()
示例#3
0
            run_wizard()
    with open('data/config.json') as f:  
        TOKEN = json.load(f)["BOT"]['TOKEN']

async def get_pre(bot, message):
    if 'PREFIX' in os.environ:
        return os.environ['PREFIX']
        
    with open('data/config.json') as f:
        config = json.load(f)
    try:
        return config["BOT"]['PREFIX']
    except:
        return 's.'

bot = commands.Bot(command_prefix=get_pre, self_bot=True, formatter=EmbedHelp())
bot.remove_command('help')

_extensions = [

    'cogs.misc',
    'cogs.info',
    'cogs.utils',
    'cogs.mod',
    'cogs.KatCog'

    ]

@bot.event
async def on_ready():
    bot.uptime = datetime.datetime.now()
示例#4
0
async def get_pre(bot, message):

    if 'PREFIX' in os.environ:
        return os.environ['PREFIX']

    with open('data/config.json') as f:
        config = json.load(f)
    try:
        return config["BOT"]['PREFIX']
    except:
        return 's.'


bot = commands.Bot(command_prefix=get_pre,
                   self_bot=True,
                   formatter=EmbedHelp())
bot.remove_command('help')
_extensions = [

    # 'cogs.clashroyale',
    'cogs.misc',
    'cogs.utility',
    'cogs.utils2',
    'cogs.info',
    'cogs.mod',
    'cogs.stuff',
    'cogs.react',
    'cogs.crtags',
    'cogs.trophy',
    'cogs.info2'
]