Skip to content

Failed experiment about a Discord bot aims at automatically adding /spoiler to any code snippet pasted in a Discord text channel in your Discord server. (Nov.2020)

License

Notifications You must be signed in to change notification settings

Naereen/Discord-bot-to-add-spoiler-to-any-code-snippet

Repository files navigation

Discord bot to automatically add a /spoiler tag to any code snippet

Goal

See this StackOverflow post I wrote on November 2nd 2020.

Answer

« When a code snippet is detected, automatically delete the user's post and repost it from the bot with spoiler enabled. Apply basic information such as who originally posted the message. » Tin Nguyen's answer

Code

I tried to do that, but it appears that at of the time of writing (November 2020), it's just not possible to have both the /spoiler hidden effet and the code markup (syntax highlighthing), so I stopped trying.

What else is here?

There is a tiny Discord bot with small features (undocumente, read the source code, it's easy to understand):


📜 License ? GitHub license

This repository are published under the terms of the MIT License (file LICENSE.txt). © Lilian Besson, 2020.

Maintenance Ask Me Anything ! Analytics

ForTheBadge uses-badges ForTheBadge uses-git

ForTheBadge built-with-science

About

Failed experiment about a Discord bot aims at automatically adding /spoiler to any code snippet pasted in a Discord text channel in your Discord server. (Nov.2020)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published