Get Started - Learn How To Make Your Bot!

Guides

Code Snippets

Get methods

Post methods

Web API

Useful links

List of all currently Free Items

List of Emotes

Highrise Bot SDK Changelog

Added on version 23.1.0b14

get_posts(self, starts_after: str = "", ends_before: str = "", sort_order: SORT_OPTION = "desc", limit: int = 20, author_id: str = "",) -> GetPublicPostsResponse:

Fetch a list of posts, can be filtered, ordered, and paginated.

Returns:

⚙️ Use cases

Here’s an example on how to get the last post from the user saying the command:

async def on_chat(self, user: User, message: str) -> None:
        if message.lower().startswith("/getpost"):
            author_id = user.id
            posts = await self.webapi.get_posts(author_id=author_id)
            last_post = posts.posts[0]
            print (last_post)

Untitled

Response:

PostBasic(
	post_id='62b0d42156a97183fac3dfd2', 
	author_id='6111e1fb22dcb50edf32e4a8', 
	created_at='2022-06-20T20:10:09.476000+00:00', 
	file_key='posts/6111e1fb22dcb50edf32e4a8/62b0d41f0a160174540ba611_0.webp', 
	type='photo', 
	visibility='public', 
	num_comments=4, 
	num_likes=3, 
	num_reposts=0, 
	body=PostBody(
		text='None', 
		inventory=PostInventory(items=[])), 
	caption='num dia desses comuns que eu nĂŁo me sinto normal', 
	featured_user_ids=[])