devOS-Sanity-Edition / TeaBridge

A simple survival friendly MC -> Discord chat bridge
MIT License
6 stars 0 forks source link

[feature] Send logs to seperate channel #11

Open Merith-TK opened 1 year ago

Merith-TK commented 1 year ago

I was hoping it would be possible to (on server shutdown or crash) upload latest.log rather than latest crash log? sometimes crashlogs are useless on fabric/quilt when the error is actually only in the latest.log file

And the option to have the bot send the log link to an seperate channel rather than the same chat link channel

asoji commented 1 year ago

It's a good idea, but from what I'm hearing from @maximumpower55, this would require a significant rewrite, since the mod is built upon just one webhook right now.

Merith-TK commented 1 year ago

I don't think it would require one? Just an

If config.LogWebhook != "" Then
  Send log to config.LogWebhook
Else
  Carry on

And the webhook send function could be altered to accept an argument internally for an specified webhook, and then just call the config variable for the argument like

send(conf.Webhook, [the other data needed ...])?

I haven't looked at the mod code but this is how I would do it.