Discord Bot (clockwork-bot)

This thread is for the Discord bot “clockwork-bot” that, presently, will broadcast updates from the Clockwork team (@yong and @hal) to the community’s Discord server. The repository where the source code of the bot lives here.

If anyone has any thoughts for improvements or additional features that it can could perform, you can either state them here, create an issue on the repository, or send a pull request if you feel inclined to code something up yourself. As long as the code works and doesn’t do anything malicious, I’d be happy to merge it into the project.

So everyone, what’s your thoughts, ideas, and feelings about clockwork-bot?

1 Like

Thank you! @aewens
This is very cool.


The bot now works across any thread, but will only trigger if @yong or @hal uses #announcement or #update in their reply.

@yong In regards to the latest update, when you mentioned using #announcement or #update were you referring to using that in the message itself or for new threads created with the #news (Accouncement and News) tag?

As of now, the bot detects any new replies from you (@yong) and @hal when you include #update or #announcement in the reply with it, so it did not notice the trigger the bot when the last update was posted on the forum.

I got it. So the bot is only triggered in the replied messages now.
It would be great to also add it to the new created threads too. I could make sure to use either #update or #announcement in all this kind of posts in future.
Thank a lot for your work!

I can certainly add a trigger for it to look for new threads with the #news tag. It will probably be later this week, though, since the power supply on the machine with testing version of the bot just burned out last night :fire: However, when that new feature is added I’ll post an update on this thread.

Burned!? :scream:
No rush! Let’s give the poor machine some time to rest and heal :mage:

1 Like

Update on the Discord Bot:

The testing server that the bot was originally setup on is still down. After replacing the power supply I found that the hard drive is no longer recognized. Until then I’m setting up a Digital Ocean droplet for testing purposes to emulate the environment of my dedicated server. Once I have everything setup I’ll go about adding the detection for finding updates based on the thread’s tags rather than looking for “#update” in the message. I would have had this done sooner, but the last few weeks I’ve been more busy than usual.

In other news, I’ve noticed the bot seems to timeout / crash for no explicit reason (I intend to also add logging to the bot to get a better idea what is causing it crash). My temporary solution was just restarting it manually, but have now set up a cron to monitor every few minutes if it has crashed and restart it if it has. To the best of my knowledge, it appears it’s crashing is related to when there’s more activity on the forum. If this is the case, I may need to break out the bot into two separate services (one to monitor new forum messages for events that trigger the bot, and the bot itself).

I’ve updated the bot today to look for messages with the update tag (as has been the trend for recent updates) instead of looking for a “#update” in the message. It will only pull the first post, so long as it was posted since the last time it checked the forum for new posts. This greatly reduces the posts it’s looking through and since it’s no longer reading every message to look for “#update” it should prevent it from crashing like it was before. As well, it will now post in the #news Discord channel rather than #general.

Fingers crossed that it works whenever the next update comes out! :robot:


Thanks! That’s a great feature update.

1 Like

you can make a discord bot if you don"t know what is procedure or how can you do this so you can do this by following guidelines