Skip to content


Sending A Reply

You can send a reply by calling reply on a Message object:

import hoist

server = hoist.start(...)

async def msg(message: hoist.Message):
    new_message = await message.reply("this is my reply!")
    print(f'new message id is {}')

Listening For Replies

Since most message responses are called by the time we might call the receive decorator, things might not work as intended.

So, we need to ensure that the receivers are setup before we send the message. We can do this via message_later:

async def msg():
    async with server.message_later("hello") as msg:
        async def hi(msg: hoist.Message):
    # message gets sent at the end of the context, message listener is ready!