The most complete bot for moderation, utility, and fun in Reddit Chat.
Some dependencies do not need to be installed for Snooful to function, but they do provide some features that will automatically disable if not present. Here is a reference to modules that do this and what changes when they aren't installed:
debug
- replaced with a basic write tostdout
esrever
- reversing (thereverse
command) won't account for fancy Unicode thingsgit-last-commit
- the most recent commit hash will never be shown in theversion
commandlodash.chunk
- some commands (likecommands
andlistfaq
) will not be paginated
Snooful uses JSON for configuration. This file is located at ./config.json
, and must be created manually.
To use Snooful, you must provide credentials, which are taken from snoowrap. The user agent cannot be set as it is automatically set to one containing the version. To get these, go to applications and generate a new app. Fill in the credentials
object of configuration (see the example config for what a script-type config would look like).
Snooful can store data for subreddits and groups. This is left to a separate module, which is configured with the settingsManager
option. This value must be resolvable by require()
, or else Snooful will not run. Because of this, it is necessary to npm install
the settings manager before you set that option.
Here are some official settings manager modules:
Switching the settings manager does not transfer the existing data. However, you can use a tool to do this yourself.
You can also configure the prefix from the default !
by setting prefix
. The prefix is the thing that differentiates a command from a message. Basically, with a prefix of ?
, you must type ?ping
to run the ping
command.
Please change the prefix if you are hosting your own version of Snooful.
Since this project uses debug
, you can also set the environment variable DEBUG
to snooful:*
to recieve logs of everything notable happening with Snooful. This package also has other environment variables that can be set, which are:
DEBUG_HIDE_DATE
DEBUG_COLORS
DEBUG_DEPTH
DEBUG_SHOW_HIDDEN
These environment variables have no effect if debug
is not installed.
Here is an example configuration:
{
"prefix": "?",
"id": "t2_a1b2c3",
"credentials": {
"clientId": "a897d89f89e",
"clientSecret": "0202390301209919219810929012",
"username": "Snooful-Example",
"password": "h0pefully-s3cure"
}
}