import discord
TOKEN = 'TOKEN'
client = discord.Client()
async def message_sender():
channel = client.get_user(id)
while True:
await channel.send(input('Message: '))
@client.event
async def on_ready():
print( 'Bot ready' )
await message_sender()
client.run(TOKEN)