Closed AtoraSuunva closed 5 years ago
Stuff that'll affect you as a user.
Things in between []
are parameters for commands, don't actually include the []
[this/that]
means that you use either this
OR that
=
to booru!
or b!
b!help
will display all commands, use b!help [command]
for extra help on a commandb!help [command]
to see them
b!help search
will display extra help for the search
command"
and '
work, so you can use spaces in parameters
b!example hello 'there world'
sees two parameters, hello
and there world
test
takes 2 params, if you do b!test hello there world
, hello
is param 1, there world
is param 2)booru!search [site] [tag1] [tag2...]
b!s [site] [tag1] [tag2...]
b![site] [tags...]
e926.net
is now supportedderpibooru.org
is now supportednsfwServer
can be used to treat every channel in the server as nsfwtopicEnable
setting insteadb!blacklist
to view blacklistb!blacklist [tag/site] [thing]
to blacklist a tag or site (b!blacklist tag cat
)b!whitelist [tag/site] [thing]
to whitelist somethingb!bl
and b!wl
are aliases for blacklist
and whitelist
b!bl site [all/nsfw/sfw]
is still a thingb!wl [site/tag] all
clears the blacklist for sites/tagsb!delete
command added, use it to get BooruBot to delete the last image
b!delete [X]
will delete the last X images, searching the last 50 images (limited to 3 for normal users, 10 for those with "Manage_Messages", if BooruBot has "Manage_Messages" perms, limit is raised from 10 to 50)b!settings
b!settings [setting] [newValue]
disableDMs
: Disables DMing the bot if all the shared servers have this enabledtopicEnable
: Only allow BooruBot to search for images in channels with bb=true
in the topicnsfwServer
: If every channel should be treated as nsfwminScore
: Minimum score an image must have before postingdeprecationWarning
: Warn if you try to use an old boorubot commandlink
b!link https://e621.net/post/show/1192588/ambiguous_gender-blue_eyes-blush-eeveelution-glace
does http://i.imgur.com/pxLttug.pngI probably forgot some changes whoops
Things that don't really directly affect users
MUST be run using node v7.3.0 and above, using node --harmony modules.js
.
This is because I'm using async
and await
to make randSearch much more tolerable to look at.
You can take the module system from this bot, I don't mind.
Just keep in mind the only docs available are the comments in the code, modules/test.js
, and this.
Moved to a cool and new module system that allows me to separate commands into different files
config.json
, modules in subdirectories are allowedChecks for invokers are done automatically, supporting both multiple global invokers in config.json
, and multiple local invokers in each module's config
Offers a bunch of helpful methods (accessed by using bot.modules
), such as:
.shlex(str)
: Removes the (global) invoker from a command and slices the arguments up into an arrayb!test hello 'there world' aaa
=> ['test', 'hello', 'there world', 'aaa']
.loadModules()
: (Re)load all modules.loadModule(moduleName)
: (Re)load a specific module.unloadModule(moduleName)
: Unload a specific module.config
to access the config.json
file, .reloadConfig()
to reload it.reportError(Error, errType)
: DM the owner the error message, returns an errID.settings
: A class with methods to deal with settings: .get(id)
: Get the settings for a certain ID, creating them from ./defaultSettings.json
if needed.set(id, newVal)
: Set the settings for an ID to newVal.save(id)
: Writes the settings for an ID to a file (./settings/${id}.json
).saveAll()
: Saves all the settings.saveAndExit()
: Saves all the settings, then exits the botFetches the owner info automatically
sb
=> safebooru.org
)uws
for extra speed
booru
to search=
to b!
=
conflicted with way too many bots.topicEnable
and put bb=true
in the topics of channels you want to use BooruBot's search innsfwServer
)b!delete
//todo: write this
Let's face it, BooruBot v2 still sucks.
So I'm rewriting the entire thing.
tl;dr of changes
Or scroll down for detailed changelog.
[x] Move over to the module system I wrote
[x] Make booru searching a module. Here it is.
[x] Rewrite all the commands
rand
/random
again aaaaaa()
in image linkorder:random
support for sites that don't have it in the booru module?)topicEnable
)b!bl cat
blacklists tag catmodules.js
disableDMs
: Prevent people from DMing the bot if every shared server has this enabledtopicEnable
: Only allow boorubot to search in channels withbb=true
in the topicnsfwServer
: Treat every channel in a server as being nsfwdeprecationWarning
: Show a warning if a users tries to use an old BooruBot command[x]Actually seems more like a bother for me and the people using it so ¯\_( )ツ_/¯showUpdates
: Show an update log on the first command used after an updateminScore
: Minimum score images must havelink
command, see #13invite
command, for both bot and server (send to DMs only?)[x] Addi give up (at least in this version)tutorial
maybe? (Kinda done, needs debugging)[x] Make it case-insensitive
[x] Move to system to fully support edits?
[x] Clean up code a bit
deprecation.js
since it's not showing warning messages?search.js
less of an assault on the eyes[ ] Use awaitReaction instead of weird reactionAdd thingdropped because it has weird issues that cause it to not be reliable enoughrating:s
)[x] Test the hell out of it (Thanks error logs)
[x] Move old settings to new format
[ ] Use a proper database (?)dropped because the current system works well enough and is easily extendible