Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext.commands import AutoShardedBot, when_mentioned_or
- import dados
- client = AutoShardedBot(command_prefix=when_mentioned_or("rt.","!!"), case_insensitive=True, shard_count=2, shard_ids=(1,2))
- @client.event
- async def on_ready():
- print(f"[OK] - {client.user.name} ({client.user.id}) - (Status - Online)")
- await client.change_presence(activity=discord.Streaming(name="digite !!help", url="https://www.twitch.tv/yuka"))
- def run_modules():
- try:
- client.remove_command('help')
- for modulo in dados.modulos():
- client.load_extension(modulo)
- print(f"[OK] - {len(dados.modulos())} modulos carregados.")
- except Exception as e:
- print(f"[Erro] - O modulo {modulo} não foi carregado.\n[Erro] - {e}")
- try:
- client.run(dados.token())
- print(f"[OK] - Conectado ao discord(Bot).")
- except Exception as e:
- print(f'[Except] - Houve um erro ao conectar discord(bot)\n[Erro] - {e}')
- if __name__ == '__main__':
- run_modules()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement