예제 #1
0
파일: Gib.py 프로젝트: lwhgit/Gib
async def on_ready():
    global state
    
    try:
        Log.i("[" + client.user.name + "]", end="")
        Log.i(" Logged In")
        Log.line()
        Log.i("Servers:")
        for server in client.servers:
            serverDatas[server.name] = ServerData(server)
            Log.i("    [" + str(server.name) + "]")
            Log.i("        Channels:")
            try:
                for channel in server.channels:
                    if (channel.type == 4):
                        continue
                        
                    Log.i("            [" + str(channel.type) + "]")
                    if (channel.type == discord.ChannelType.voice):
                        await client.join_voice_channel(channel)
            except Exception as e:
                Log.e("Exception: " + str(e))
            
        Log.line()
        
        state.ready = True
        
        await checkPlayer()
    except Exception as e:
        Log.e("Exception: " + str(e))
예제 #2
0
파일: Gib.py 프로젝트: lwhgit/Gib
def login(index):
    Log.line()
    Log.i("Bot : " + TOKEN[index]["name"])
    Log.i("Try to login.")
    client.run(TOKEN[index]["token"])