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

Send the Discord spoiling code in attachment file #307

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

pyrech
Copy link
Member

@pyrech pyrech commented Dec 11, 2024

Discord does not allow message to be more than 2000 chars. But with a lot of participants, the spoiling code can be quite long, so we could not send the admin message. Let now send the spoiling code in a attached file instead.

Also removed Restcord which is unmaintened and use symfony/http-client directly.

Here is how the admin message now looks:

image

In a future, we could also:

  • do the same for slack?
  • tweak the spoiling form to accept a file upload and avoid people to need to manually copy the code and just upload the file

@pyrech pyrech force-pushed the spoiling-code-attachment branch from 39ab2d0 to 3265ba5 Compare December 11, 2024 00:45
@pyrech pyrech force-pushed the spoiling-code-attachment branch from 3265ba5 to 3984031 Compare December 11, 2024 00:46
Copy link
Member

@damienalexandre damienalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Maybe just one issue, restcord/restcord was dealing with rate limits from the API. With this implementation we will not have this capability, am I right?

@pyrech
Copy link
Member Author

pyrech commented Dec 11, 2024

Good catch, I will try to use the RetryableHttpClient from symfony/http-client to handle those cases

@pyrech
Copy link
Member Author

pyrech commented Dec 11, 2024

Should be good now, a RetryableHttpClient is now used so it should respect the retry strategy from Discord

@pyrech pyrech merged commit d7166cc into main Dec 11, 2024
2 checks passed
@pyrech pyrech deleted the spoiling-code-attachment branch December 11, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants