title: discord.py channel.send AttributeError: 'NoneType' object has no attribute 'send'
body: <p>Ok so, I've got code like this:</p>
  <pre><code># bot.py
  import os
  import sched
  import time
  import discord
  import datetime
  
  from discord.ext import tasks, commands
  from dotenv import load_dotenv
  
  import Library
  
  load_dotenv()
  TOKEN = os.getenv('discordToken')
  
  bot = commands.Bot(command_prefix='Question')
  client = discord.Client()
  lastEmbed = None
  # s = sched.scheduler(time.time, time.sleep)
  channelId = 692724253237313576
  channelId = 765541418701684736
  channel = client.get_channel(channelId)
  
  @bot.event
  async def on_ready():
      channelId = 765541418701684736
      channel = client.get_channel(channelId)
      print(f'{bot.user.name} has connected to Discord!')
      await channel.send(self.client.get_channel(channelId), &quot;And what&quot;)
  </code></pre>
  <p>And I have problem with the last part:</p>
  <pre><code>await channel.send(self.client.get_channel(channelId), &quot;And what&quot;)
  </code></pre>
  <p>I tried loads of different solutions but every time it throws exactly the same exception:</p>
  <pre><code>Ignoring exception in on_ready
  Traceback (most recent call last):
    File &quot;C:\Users\grzes\PycharmProjects\CoronaBot\venv\lib\site-packages\discord\client.py&quot;, line 333, in _run_event
      await coro(*args, **kwargs)
    File &quot;C:/Users/grzes/PycharmProjects/pythonProject1/bot.py&quot;, line 57, in on_ready
      await channel.send(self.client.get_channel(channelId), &quot;And what&quot;)
  AttributeError: 'NoneType' object has no attribute 'send'
  </code></pre>