-
Notifications
You must be signed in to change notification settings - Fork 18
Configuration
Tim K edited this page Jun 2, 2017
·
2 revisions
This page contains all properties that can be defined in the spoiler bot config. For example usage, see Usage section.
Property | Default value | Description |
---|---|---|
token [required if no client is specified]
|
None | Secret token of your Discord bot |
client [required if no token is specified]
|
None | An instance of Client object from discord.js or discord.io libraries. Can be used if you want to attach Discord Spoiler Bot to and existing bot. |
markAllowAll |
false | Allows everyone to mark messages of other users as spoilers. |
markRoleIds |
None | Array of strings, where each string represents an ID of a role that user must have to be able to mark other messages are spoilers. |
markUserIds |
None | Array of strings, where each string represents an ID of a user that can mark other messages as spoilers. |
maxLines |
6 | Maximum amount of lines that spoiler content can span over. |
include |
None | Array of strings, where each string represents an ID of a channel. When this property is set, bot will only listen to the specified channels. Cannot be used together with exclude . |
exclude |
None | Array of strings, where each string represents an ID of a channel. When this property is set, bot will listen to all channels but the one specified in this array. Cannot be used together with include . |
extractSpoiler |
None | Function that extracts spoilers and commands from messages, allowing users to specify custom spoiler formats. Takes a DiscordMessage object, fetchMessage function, checkMarkPermission functionand a callback. If the specified DiscordMessagecontains a spoiler, a Spoilerobject should be sent to callback. Otherwise, null` should be sent. Check Usage section for examples. |
gif > margin
|
10 |
Margin (in pixels) between the text and the borders of the GIF. |
gif > width
|
400 |
Width of the GIF in pixels. |
gif > lineHeight
|
40 |
Height of a line of text on the GIF. |
gif > placeholderText
|
( Hover to reveal spoiler ) |
Text displayed on the first frame of the GIF. |
gif > fontSize
|
13px |
Font size. |
gif > colours > background
|
#3c3f44 |
Colour of the GIF background. |
gif > colours > stroke
|
#3c3f44 |
Colour of GIF borders. |
gif > colours > text
|
#3c3f44 |
Colour of the spoiler text. |
gif > colours > placeholder
|
#3c3f44 |
Colour of the placeholder text seen above. |