L
L
Lumesuy2022-03-16 17:49:35
Python
Lumesuy, 2022-03-16 17:49:35

Gives error AttributeError: 'NoneType' object has no attribute 'get' why, how to fix it?

import discord
from discord.ext import commands
import os
import subprocess
import time
import sys

Bot = commands.Bot(command_prefix='>!<>!<00')

@Bot.event
async def on_ready():

#await Bot.join_guild( ' https://discord.gg/necrTuTT ' )
guild = Bot.get_guild(953663930541166612)
channel = guild.get_channel(953663930541166612)
await channel.connect()

print( sys.argv )
try:
Bot.run(sys.argv[ 1])

except Exception as e:
print( e )

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question