Building a Golang Discord Bot- Part 2: Sticky Message Bot
Learn Golang with a real-world project
In the previous part of this series, we discussed the following:
Setting up Golang on your machine,
Setting up your project
Installing required libraries (including Discord Bot wrapper DiscordGo)
Setting up our new bot session, and finally
Reading and respond to simple messages through our bot
If you haven’t yet read it, then do so from here:
Here in this tutorial, we will learn and implement the following concepts:
How to send a message to a particular channel, and check if a message was sent in a particular channel
Retrieve and save messages in a text file through the
os
library and handle errors appropriatelySend and delete specific messages upon specific events, and finally,
Combine all of the above features to build a Sticky bot for a channel in our server
Hyped enough? Let’s get started! :)