send flagged message notification to discord
Send a notification to Discord so the mod team can quickly take action. This is a temporal workaround for https://github.com/LAION-AI/Open-Assistant/issues/968. Also we don't need a UI for it.

:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
Thanks @notmd :). while you are at it. was thinking if you could
- move the sending to a celery task (check scheduled_tasks.py).
- save the flagged message ids in Redis list with a "date in the name" and TTL=24hrs
- have a scheduled task in celery that will compose a discord message with the number of flagged messages, their IDs etc .. and send them every 4hrs say (configurable)
This would help the mods even when #968 is implemented and also not overwhelm discord with all the flagged messages.
@andreaskoepf what is your opinion?
Thank, just thinking about moving it to celery too. But 4h is so long. I saw many times the tree grow so fast, new children might come in less than 1h. Also, notification means I want to send it immediately so the mods can take action quickly so we don't waste contributor effort. Is it ok to have the celery tasks run every 5 min or less than that? Discord allow to send up to 50 message per sec or 10000 per 10 mins.
@notmd yes, I agree. 4hrs is long. Yes, you can have celery tasks run every 5 mins or lesser.
Will need a follow-up PR for the celery task