Skip to content

Commit

Permalink
♻️ add DALLE draw webhook event
Browse files Browse the repository at this point in the history
  • Loading branch information
louis70109 committed Jun 3, 2023
1 parent c1bbe2a commit 5cfd64e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routers/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def message_text(event: MessageEvent) -> None:
alt_text=name, contents=contents)
elif re.findall('^find\s*.*\s*.*', message):
response: FlexSendMessage = get_pokemon_status(message)
elif re.findall('^:draw\s*.*\s*.*', message):
msg_split: List[str] = message.split(' ')
image_url = generate_random_image(msg_split[1])
response: ImageSendMessage = ImageSendMessage(image_url, image_url)
else:
response: TextSendMessage = search_pokemon_wiki(message)

Expand Down

0 comments on commit 5cfd64e

Please sign in to comment.