Skip to main content

Command Palette

Search for a command to run...

Building Hashnode's Discord Bot - What, why and how?

Published
2 min read
Building Hashnode's Discord Bot - What, why and how?
F

I am a full stack web developer from Scotland. I have some pretty cool projects going on over at my GitHub page. Check it out!

2 days ago I set out to create the first ever Discord bot for the Hashnode platform. Today marks the day of its first release.

In this article I will go over what it does/how it does it, why I made it, and how you can set it up on your own discord!

But before that, you can invite it to your own server here

What

The Hashnode Discord bot currently doesn't have many features but aims to do what I and others need for their own Discord. I am open to suggestions and pull requests on its GitHub repository

The bot's main feature is allowing you to subscribe a channel on your Discord server to a specific Hashnode blog. Whether it's your own or another person's, the bot does this.

It does this by keeping a cache of all posts it has encountered and requesting information from the Hashnode API every 30 seconds and then works out what to post and where to post it.

Why

As I previously mentioned, the Hashnode Discord bot aims to give me and others a way to integrate their or other's Hashnode blogs with their Discord servers, easily, and reliably.

So far this has been achieved and I am hoping to add new features that will achieve this further.

How

To use this bot, you first must invite the bot using the link at the start of this article.

Then, go into any channel the bot has access to and run ?assign blogname #channel. If something goes wrong the bot will tell you. Within 15 seconds after doing this the bot will send 6 of your most recent blog posts (if you have that many, less if not)

Here is what my Discord looks like

image.png

E

Bunu kullanmak için çok heyecanlıydım. Kendi blog yazılarım discord sunucumda otomatik olarak paylaşılacaktı. Ancak bot neden çevrim dışı. Test edemiyorum. Ayarlayamıyorum. Gerçekten çok üzücü. Hayal kırıklığı yaşadım :(

G
G24y ago

Tried using this bot, but the commands do not seem to work 🤔

F
Floffah4y ago

I forgot to update this post, the bot now uses slash commands so you may need to reinvite it with permission to register slash commands using this link: https://discord.com/api/oauth2/authorize?client_id=745344625744543755&permissions=68608&scope=bot%20applications.commands

1
D

Awesome, I love Discord Bots. We have just published a post explaining what carl bot for discord is :) Gonna check out yours!

M
Mal5y ago

nice!

2
F
Floffah5y ago

Thank you!