Together-Java / TJ-Bot

TJ-Bot is a Discord Bot used on the Together Java server. It is maintained by the community, anyone can contribute.
https://togetherjava.org
GNU General Public License v3.0
98 stars 82 forks source link

refactor thread creation flow #1111

Closed ankitsmt211 closed 1 month ago

ankitsmt211 commented 1 month ago

Is your feature request related to a problem? Please describe.

current thread creation flow involves retrieving the same message at least times at top level, which is lets just say not very optimal. Describe the solution you'd like

The idea is to avoid retrieving same message again and again and pass it further down the chain so it can be later used inside pinned logic. Additional context

The chain looks much simpler at top level, but it has a lot of moving parts.

HelpThreadCreatedListener-> application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadCreatedListener.java method-> HelpThreadCreatedListener#handleHelpThreadCreated