You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

59m 49s logged

Building a Solid Architecture & Custom Logger for VOIDBOT

Today I spent a solid hour setting up the foundations for VOIDBOT. Since I have no prior experience building Slack bots, I wanted to make sure the project structure was robust right from the start instead of just packing everything into a single file.

Here is what I achieved during this coding session:

  1. Setup and modularity: Created a dedicated config.py file to handle environment variables automatically. If the .env file is missing, the script generates a template setup by itself to prevent crashes.
  2. Main Engine: Configured main.py using the Slack Bolt framework in Python. Tied it directly with the configuration module to keep the tokens clean and secure.
  3. Custom Utility: Coded a custom logging module (logger.py) from scratch. It captures accurate timestamps using Python’s datetime library and appends command usage and user IDs into a local activity.log file whenever a command is triggered.
  4. Core Requirements: Fully structured the 3 mandatory slash commands (/ping, /about, and /voidtune) with strict adherence to Slack’s 3-second acknowledgement rule.

Everything is pushed to my GitHub repository, and my Hackatime is running smoothly. Ready to tackle the Slack API portal and credentials next!

0

Comments 0

No comments yet. Be the first!