Skip to content

Commit

Permalink
Update repo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnieBLT authored Jun 14, 2024
1 parent c54ce1b commit 165c737
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lettuce/plugins/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ async def repo(self, command):
]
}

await command._client.client.chat_postMessage(
await self.client.web_client.chat_postMessage(
channel=channel_id, blocks=message_preview["blocks"], text=fallback_message
)

@action(action_id=re.compile(r"plugin_repo_button_.*"), block_id=None)
async def handle_button_click(self, action):
clicked_button_value = action.payload.actions[0].value
clicked_button_value = action.payload["actions"][0]["value"]
repos = self.repo_data.get(clicked_button_value)
repos_list = "\n".join(repos)
message = (
f"Hello, you can implement your '{clicked_button_value}' knowledge here:\n{repos_list}"
)
await action._client.client.chat_postMessage(
await self.client.web_client.chat_postMessage(
channel=action.payload["channel"]["id"], text=message
)

0 comments on commit 165c737

Please sign in to comment.