- Notifications
You must be signed in to change notification settings - Fork18
🗣️🛑 Spoiler support for Discord
License
TimboKZ/discord-spoiler-bot
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A Discord bot that replaces spoiler messages with GIFs that reveal content on hover.
CheckDiscord Spoiler Bot Wiki on GitHub for full documentation. See section below for the quick start guide.
If you know what you're doing, you can jump right in. First, make sure you haveall prerequisites fornode-canvas installed. Then add Discord Spoiler Bot to your npm project:
$ npm install discord-spoiler-bot --save
Now get a secret token for your bot and make sure the bot has permission to read, write and delete messages as well as upload files. Create a file calledindex.js and put the following inside:
'use strict';constSpoilerBot=require('discord-spoiler-bot');letconfig={token:'you_secret_token_here',};letbot=newSpoilerBot(config);bot.connect();
Launch your bot using Node.js:
$ node index.js
And you're done! Write messages of format<topic>:spoiler:<content> to mark your own messages as spoilers, e.g.:
FMA:spoiler:Elric brothers are alchemists!To mark someone else's messages, use<message-id>:spoils:<topic>, but you will have to configure permissions first. SeeConfiguration section.
Already have a bot running ondiscord.js ordiscord.io? You can supply an instance ofClient instead of a token, seeUsage section for examples.
Please create an issue threadhere. I will try to reply and resolve issues to the best of my ability.
- It's been reported that GIFs play continuously on mobile devices instead of stopping after revealing the spoiler. Sadly this is a limitation of the mobile Discord app and I can't do anything about it.
- On Windows,
node-canvaslibrary does not support true type fonts so Discord Spoiler Bot uses the defaultnode-canvasfont instead of Source Sans Pro Regular.
I believe this bot is feature-complete, and from now on will most likely only fix bugs. Before adding a new feature to this bot and creating a pull request, make sure said feature makes sense in the context of Discord Spoiler Bot.
Make surenpm test andnpm run lint return no errors before making a pull request, otherwise I might reject it.npm run test-no-delete is available for your convenience, running this command will make sure that GIFs produced during testing are not removed so you can inspect them for any artifacts.
About
🗣️🛑 Spoiler support for Discord
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.


