#!/usr/bin/python from discord import Client from sys import argv import asyncio async def main(target, message): client = Client() await client.login('your token') user = await client.fetch_user(target) if len(message) > 250: for i in range(len(message) // 1900 + 1): await user.send(f'```{message[1900*i:1900*(i+1)]}```') print(f'```{message[1900*i:1900*(i+1)]}```') else: await user.send(message) await client.logout() await client.close() if __name__ == '__main__': try: loop = asyncio.get_event_loop().run_until_complete(main(*argv[1:])) except Exception: pass