on open source contribution on a discord moderation bot to implement stickied messages. stickied messages are messages that persist at the bottom of the channel/feed/etc in the hopes that they are read :)
on open source contribution on a discord moderation bot to implement stickied messages. stickied messages are messages that persist at the bottom of the channel/feed/etc in the hopes that they are read :)
pretty straightforward implementation of sticky messages with kotlin, a language that is still pretty new to me. generally, I think it well, ran into some issues surrounding the flow of setting a message / updating it after starting a message (and also error handling since, originally if you manually deleted the message before the bot updated it it would just…. fail in the coroutine and never post a new one woopsy!)
the goal of this feature was to be able to sticky messages in channels on discord, for security concerns we weren’t able to add another discord bot but, we wanted to add it to our internally maintained discord bot
what are sticky messages?
they are messages that are constantly bumped to the bottom of the feed within channels, so that hopefully people won’t miss them!
branch diff against upstream: https://github.com/SantioMC/MinehutUtils/compare/master...DDbrother9999:MinehutUtils:feat/starlight/sticky
manager
logging
comments / lint
this was my first time using kotlin, from developing in java so managing null values explicitly was something new for me
Log in to leave a comment