mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
20 lines
766 B
JavaScript
20 lines
766 B
JavaScript
import { renderExtensionTemplateAsync } from '../../extensions.js';
|
|
import { registerSlashCommand } from '../../slash-commands.js';
|
|
import { SlashCommand } from '../../slash-commands/SlashCommand.js';
|
|
import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js';
|
|
|
|
jQuery(async () => {
|
|
const buttons = await renderExtensionTemplateAsync('attachments', 'buttons', {});
|
|
$('#extensionsMenu').prepend(buttons);
|
|
|
|
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
|
|
name: 'db',
|
|
callback: () => document.getElementById('manageAttachments')?.click(),
|
|
aliases: ['databank', 'data-bank'],
|
|
helpString: 'Open the data bank',
|
|
interruptsGeneration: true,
|
|
purgeFromMessage: true,
|
|
}));
|
|
|
|
});
|