Earlier speculation around this issue in this PR https://github.com/Together-Java/TJ-Bot/pull/1078 were "delay" in thread creation resulted in such behaviour. Method responsible for pinning question to said channel, also rely on earlier way of retrieving thread messages. This is not just better way to retrieve such message but also should possibly fix the above error around unknown message.
Earlier speculation around this issue in this PR https://github.com/Together-Java/TJ-Bot/pull/1078 were "delay" in thread creation resulted in such behaviour. Method responsible for pinning question to said channel, also rely on earlier way of retrieving thread messages. This is not just better way to retrieve such message but also should possibly fix the above error around unknown message.