Please sign in to access this page
Welcome! My project features a bot for Discord communities to create detailed timers, alarms, and reminders in their Discord server. This project is very special to me because it was actually my very first coding project back in 2020! A project so small also happened to be the project that helped me discover my true passion for coding, and helped me start my journey with Node.js development. For years now, Discord has lacked a native way to create timers, alarms, and reminders in Discord servers (a rather simple feature that many large communities have asked for). This bot is my attempt to finally solve that problem once and for all!
I started developing this bot back in middle school, but over time, it became too overwhelming with the constant changes to Discord's API. With factors outside of my reach like rising server costs and busy study nights throughout the week, I eventually decided to shut down the project. Well, my goal this week is to try and bring it back to life, and rebuild the entire thing from the ground up!
I'll be honest, being my first ever coding project, Timer Bot was definitely the sloppiest code I've ever written (nowhere near being production-ready). So I figured why not spend this Summer rewriting the entire thing from scratch. I recently picked up some new equipment to help keep my personal projects running (like websites and Immich servers), so this is my attempt of reviving it and giving it another life :)
Features:
- (⏱️) Create precise timer countdowns with hours, minutes, and seconds.
- (⏰) Schedule alerts for specific dates and times in your local time zone.
- (📝) Add titles and descriptions to your alarms to be notified of your upcoming events, goals, and more!
- (💾) Save timer configurations with custom names for quick access anytime.
- (📋) Manage all your running timers, alarms, and reminders in one place.
- (🌐) Set your local time zone for accurate alarm scheduling.
- (🔔) Choose users or roles to notify when an event ends.
dave9123
Check their projects out: Recall Me, Lenie, InstaQuote
Cheung Chan
Check their projects out: Crypto mining simulator, stock simulator
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
I've created a simple Loki database migration script, and have successfully merged the databases! Timer Bot is now live on version 3.1.0!
I've updated the README, Dockerfile, and docker-compose.yml to include the updated changes and caution users. I'll be working on a helper script to migrate the old Lokijs database easily next!
Looks like I may have shipped too soon... I was not aware of this, but Prisma doesn't allow a Number type, and rather only accepts Int, BigInt, and Decimal. To combat this, I had to make a few adjustments to the db.js code so that it converts to Number respectively.
They really need to fix this... very frustrating.
I'm currently working on merging my LokiJS databases to Prisma, an open source database management library. I'll be using SQLite for my database since it's more commonly used and lightweight.
There was a bug involving the deletion of presets, where if the preset tag (the name of the preset) was a number, the interaction event would believe it's a cached interaction ID, and caused some issues. I have fixed it by adding a simple t_ string in front which is removed when handling it.
Finally, I added an optional parameter in the /timer, /alarm, /reminder, and /preset run command to specify a custom channel where the notification will be sent in. By default, leaving out this parameter will send the notification in the same channel the command was run (as it was earlier)
I've noticed that many users are in different regions across the world, so I added a simple /convert command which will allow you to convert a date and time for a certain region to your local time zone.
Just finished working on an import command allowing users to import multiple events in one go!
I've been looking over the code a bit and have implemented a /export command, which allows users to export all events at ONCE as an ICS or JSON file.
Also, it came to my attention that the rate limit for active events was only one... that was 100% a mistake and I must've skipped over it as I was testing on the development server. It was fixed to 15 events now!
It's been a while! I'm currently working on a handful of small improvements, including an Add to Calendar feature allowing you to generate an ICS file for easy Google Calendar / Apple Calendar implementation.
I'm working on a few admin commands, including an eval command (which may or may not be a smart idea...)
Working on small imperfections, fixing Docker configurations, added check for environment variables.
Some of my written libraries (like the PayPal integration) need access to a client in order to send a confirmation message to users. Problem is these libraries are imported in the parent process since running them in each shard would just cause a bunch of conflicts (hence why I've implemented IPC communication from shard -> main process). After overthinking about it for 10 minutes I just figured the simplest solution was to treat shard 0 as a default singleton client and create a message listener in the shards. So that's what I did!
Currently working on implementation with the PayPal Business API for tips! My original plan was to make some quick implementation with Ko-Fi and Discord roles, but they take a 5% cut, so I setup a webhook directly to PayPal.
After about an hour of debugging DiscordAPIError[10062]: Unknown interaction bugs, I finally realized my own stupidity. I completely forgot about the Docker container running on my other server that was connected with the same bot token...
Glad to say everything works as it should now haha.
So, I may have gotten a little carried away with writing all the commands and didn't consider the fact that the ShardingManager also means I was spawning multiple instances of my database... working on making an IPC communication method now haha.
Also completely forgot that each user may have their own timezone, so I've been working on adding timezone compatibility for alarms and reminders.