2017-09-06 1 views
0

Py3의 Python Discord Message 대량 프룬 스크립트를 건네 줬습니다. 하지만 약간의 오류가 있습니다. 이전에는 작동했지만, 지금은 내게 약간의 멍청한 오류를주고 있습니다. 그것은 전에 나에게주지 않았습니다.Python3 불일치 모듈 없음 속성 클라이언트

import discord 
import asyncio 

client = discord.Client() 

@client.event 
async def on_ready(): 
    print(' ') 
    print('DBAN') 
    print('YOUR') 
    print('FUCKING') 
    print('DISCORD') 
    print('MESSAGES') 
    print('LOSER') 
    print('Logged in as:', client.user.name) 
    print('UID:',client.user.id) 
    print('Discord version:',discord.__version__) 
    print('----------') 
    print('Connected to:') 
    for server in client.servers: 
     print(' -',server.name) 

# Define commands 
@client.event 
async def on_ready(): 
    if message.author == client.user: 
     commands = [] 
     z = 0 
     for index, a in enumerate(message.content): 
      if a == " ": 
       commands.append(message.content[z:index]) 
       z = index+1 
     commands.append(message.content[z:]) 

     # MASS DELETE OWN MESSAGES 
     if commands[0] == 'xc': 
      if len(commands) == 1: 
       async for msg in client.logs_from(message.channel,limit=9999): 
        if msg.author == client.user: 
         try: 
          await client.delete_message(msg) 
         except Exception as x: 
          pass 
      elif len(commands) == 2: 
       user_id = '' 
       for channel in client.private_channels: 
        if commands[1] in str(channel): 
         if str(channel.type) == 'private': 
          user_id = str(channel.id) 
       async for msg in client.logs_from(discord.Object(id=user_id),limit=9999): 
        if msg.author == client.user: 
         try: 
          await client.delete_message(msg) 
         except Exception as x: 
          pass 

client.run("TOKEN HERE",bot=False) 

Py3 Pip을 사용하여 스크립트에 필요한 discord와 asyncio (필수 모듈)를 설치했습니다. 4 호선에서 는 (클라이언트 = discord.Client는()) 이

Traceback (most recent call last): 
    File "discord.py", line 1, in <module> 
    import discord 
    File "C:\Program Files\Python36\discord.py", line 4, in <module> 
    client = discord.Client() 
AttributeError: module 'discord' has no attribute 'Client' 

답변

2

당신의 프로그램이 discord.py라고 오류를 발생합니다. 실제 discord 모듈을 마스킹합니다. 프로그램을 다른 것으로 부르십시오.

관련 문제