Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple discord post formats #195

Closed
4 tasks done
aussig opened this issue Mar 28, 2024 · 1 comment
Closed
4 tasks done

Multiple discord post formats #195

aussig opened this issue Mar 28, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@aussig
Copy link
Owner

aussig commented Mar 28, 2024

Different groups / squadrons have different needs when reporting to Discord. It would be useful to support different formats. For example, a simplified black-and-white format with system titles in bold:

HIP 117865
Celestial Light Brigade : +51 Inf, 808k Bounties

To achieve this would need the following approach:

  • Rationalise all discord formatting code into a single formatter class, which has two main entry-point methods: get_plain_text() and get_embed_fields().
    1. Initially there will be just one formatter -- the default -- to replicate the current format.
    2. Each method takes an instance of the Activity class as its source data.
  • Place the formatter class in a subfolder
  • Add a picker to the preferences screen to allow the formatter to be chosen from all available in the subfolder. Could do this for each Discord channel if we're being completist (maybe for v2?)
  • Use the selected formatter when posting to Discord.
@aussig aussig added the enhancement New feature or request label Mar 28, 2024
@aussig aussig added this to the 4.0.0 milestone Mar 28, 2024
@aussig aussig mentioned this issue Mar 28, 2024
6 tasks
aussig added a commit that referenced this issue Apr 10, 2024
Implement `FormatterInterface` base class.
Split out all formatting code from `Activity` to new `DefaultFormatter`.
Start on groundwork for supporting language per webhook.
Relates to #195. Relates to #213.
aussig added a commit that referenced this issue Apr 10, 2024
@aussig
Copy link
Owner Author

aussig commented Apr 27, 2024

Closed in 84f35f6

@aussig aussig closed this as completed Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant