aussig / BGS-Tally

A tool to track and report your Background Simulation (BGS) and Thargoid War (TW) activity in Elite Dangerous, implemented as an EDMC plugin. BGS Tally counts all the work you do for any faction, in any system.
https://discord.gg/YDNVtjPnnm
MIT License
30 stars 9 forks source link

Language Per Discord Webhook #213

Open aussig opened 5 months ago

aussig commented 5 months ago

In the current pre-release implementation, the Discord language applies to all webhooks. It would be more useful to be able to set a language per webhook.

Leave the current overarching language selector in place:

aussig commented 5 months ago

The text is currently created once first, and then passed into the Discord class for posting. Instead, we'll need to re-work the way the text is generated so that it is done each time per webhook.

One way would be to pass in a dict containing text in all languages, but that is overkill as only one or two languages are likely to be used.

Better approach is to pass in a callable to the discord posting functions, which is called to fetch the text in the appropriate language as the posting function iterates through each webhook.