You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And trying to respond with an image instead of "Hello, world!".
I want to use a local file on desktop, but i can seem to figure out any way. If i try something like :
class HelloBot(Bot):
async def do_hello(self, : Message) -> str:
image_path = "./test_image/image.jpg"
await self.send_message(message, image_path content_type="image/jpeg")
Or other "self.send_XXXX(anything)" it simply wont work.
Any ideas or tips, thanks in advance !
The text was updated successfully, but these errors were encountered:
Hey, i'm a bit new to all this. Just trying to work with the basic hellobot.py
from forest.core import Bot, Message, run_bot
class HelloBot(Bot):
async def do_hello(self, _: Message) -> str:
return "Hello, world!"
if name == "main":
run_bot(HelloBot)
And trying to respond with an image instead of "Hello, world!".
I want to use a local file on desktop, but i can seem to figure out any way. If i try something like :
class HelloBot(Bot):
async def do_hello(self, : Message) -> str:
image_path = "./test_image/image.jpg"
await self.send_message(message, image_path content_type="image/jpeg")
Or other "self.send_XXXX(anything)" it simply wont work.
Any ideas or tips, thanks in advance !
The text was updated successfully, but these errors were encountered: