Pin initial puzzle channel messages to Discord Channel#862
Pin initial puzzle channel messages to Discord Channel#862calvinballing wants to merge 1 commit into
Conversation
ef1a66e to
292ba79
Compare
| return [{"fields": fields, "color": 12852794, "type": "rich"}] | ||
|
|
||
| def send_message(self, channel_id, msg, embedded_urls={}): | ||
| def send_message(self, channel_id, msg, embedded_urls={}, pin=False): |
There was a problem hiding this comment.
-
remember to match the
ChatServicecontract to your changes -
i don't love adding that parameter to
send_message, ideally we should keep it separate from the ability to pin. instead, we should independently add the ability to pin a message toChatService, and expose some way to get the id of the message, e.g. by just returning it fromsend_message
There was a problem hiding this comment.
Your proposal would definitely be a better construction. This was more of a quick and dirty way to get it working. I may look at refactoring this after hunt. I forgot before pushing that I hadn't bothered with the tests when getting it running
292ba79 to
3a2e289
Compare
We've been using this during our practice hunt successfully, but yeah, I wouldn't expect you to pull in untested code last minute :) |
This pins the two Discord messages with links (General Links, and Google Sheets Link) to the top of each Discord puzzle channel. It might also be nice to pin some later messages such as when a puzzle is solved, however if a puzzle becomes unsolved that message should get unpinned, which is a little more complicated, so I skipped that for now