[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/stoatchat/python-client-sdk/master/examples/basic.py [Back]  [Original]

import asyncio
import aiohttp
import revolt


class Client(revolt.Client):
    async def on_message(self, message: revolt.Message):
        if message.content == "hello":
            await message.channel.send("hi how are you")

async def main():
    async with aiohttp.ClientSession() as session:
        client = Client(session, "BOT TOKEN HERE")
        await client.start()

asyncio.run(main())

Web Proxy Viewer  |  New URL  |  Original Page