You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.9 KiB
49 lines
1.9 KiB
/**
|
|
* Module for interacting with a Szurubooru instance
|
|
*/
|
|
|
|
let { AbstractModule } = require('../abstract');
|
|
let { logger } = require('../../logging');
|
|
|
|
class SzurubooruModule extends AbstractModule {
|
|
constructor() {
|
|
super(
|
|
"Szurubooru",
|
|
"Interact with a Szurubooru instance",
|
|
"szurubooru"
|
|
);
|
|
this.helpAndUsage = `Usage:
|
|
'!szurubooru <tag> [<tag>...]' display a random post that matches tags
|
|
'!szurubooru config' prints config information for the room
|
|
'!szurubooru config upload' toggles uploading images from room messages
|
|
'!szurubooru iqdb' get an IQDB link for the last displayed post
|
|
'!szurubooru need [<max tag count (5)>]' show a random post that needs additional tags
|
|
'!szurubooru post <post_id>' retrieve a post and publish the image to the room
|
|
'!szurubooru random [<tag>...]' display a random image from szurubooru that matches tags if preset
|
|
'!szurubooru random update' update the random counts
|
|
'!szurubooru recent [<days> (1)]' display a recent random image within the last <days>
|
|
'!szurubooru related' display related posts to the last displayed post
|
|
'!szurubooru tag <tag> [<tag>...]' add tags to the last displayed post
|
|
'!szurubooru tag clone <post_id>' clone tags from <post_id> to the last displayed post
|
|
'!szurubooru tag remove <tag> [<tag>...]' remove tags from the last displayed post
|
|
'!szurubooru tags' list of all tags by popularity
|
|
'!szurubooru tags <tag_stub> [<tag_stub>...]' list tags similar to each <tag_stub>
|
|
'!szurubooru upload <url>' upload a remote file to szurubooru`;
|
|
this.needConfig = true;
|
|
this.defaultCommand = 'help';
|
|
}
|
|
|
|
getConfigSensitiveFields() {
|
|
return ["token"];
|
|
}
|
|
|
|
/* Commands
|
|
* All methods starting with cmd_ will be parsed at initialization to expose those methods as commdands to the user
|
|
*/
|
|
|
|
cmd_random(event, ...args) {
|
|
|
|
}
|
|
}
|
|
|
|
exports.module = new SzurubooruModule();
|