This is a simple SlackBot that posts a daily LeetCode question via Slack.
-
Head to api.slack.com to create a new OAuth key
-
Press the
Create New Appbutton -
Choose
From Manifest -
Copy the following manifest into the YAML section:
_metadata: major_version: 1 minor_version: 1 display_information: name: LeetBot features: bot_user: display_name: LeetBot always_online: true oauth_config: scopes: bot: - channels:join - chat:write settings: org_deploy_enabled: false socket_mode_enabled: false token_rotation_enabled: false -
Press
Install to Workspaceto generate the key -
Invite the bot to the channel you wish to post in
-
Configure
samconfig.tomland deploy the bot against the channel, either with theSAM build/deploy applicationVS Code task or:uv export --no-dev --no-hashes --no-emit-project -o leetbot/requirements.txt sam build && sam deploySAM installs the Lambda's dependencies from
leetbot/requirements.txt, which is generated fromuv.lockand not committed. Skipping the export deploys a Lambda withoutslack_sdk. -
Consider cron-ing the service to run at desired interval