Markdown Converter
Agent skill for markdown-converter
PepperBot is a Discord bot built with TypeScript, Discord.js, and Bun. It features a command system with piping support, GPT integration, web interface, and extensive configuration options.
Sign in to like and favorite skills
PepperBot is a Discord bot built with TypeScript, Discord.js, and Bun. It features a command system with piping support, GPT integration, web interface, and extensive configuration options.
${} for string interpolation (preferred over concatenation)DO NOT create .md files documenting changes. Do not create files like "CHANGES.md", "UPDATES.md", or any other documentation files explaining what has been modified. The git history and code itself show what has changed - additional documentation files are unnecessary and unwanted.
src/lib/log.ts)Log Levels and Usage:
log.info(): generic info that can be made public. NEVER include private user data like usernames, channel names, or message content. IDs are perfectly fine and encouraged.log.warn(): warnings. avoid including user info.log.error(): errors. avoid including user info.log.debug(): private log level for debugging. message content & user data is okay since it won't be publicized. feel free to put as much data as you want here, it's only checked whenever i need to cross reference it for debugging purposes. having useful data here is heavily encouraged, i don't mind how much is logged since it doesn't show up most of the time. TLDR: feel free to be verbose.Usage Examples:
log.info(`command executed successfully for user ${userId} in channel ${channelId}`); log.debug(`processing message: "${message.content}" from ${message.author.username}`); log.warn(`rate limit approaching for guild ${guildId}`); log.error(`database connection failed: ${error.message}`);
src/lib/classes/command.ts for available parameters and typessrc/commands/ for implementation patternsCommand class constructor with proper typing for all parametersgetArgumentsTemplate() for argument parsingCommandResponse objects for proper piping supportCommand Structure Example:
const command = new Command( { name: 'commandname', description: 'short description', long_description: 'detailed description with examples', tags: [CommandTag.Utility], options: [/* CommandOption objects */], access: CommandAccessTemplates.public, input_types: [InvokerType.Message], example_usage: "p/commandname example" }, getArgumentsTemplate(/* template type and args */), async function execute({ invoker, args, guild_config, piped_data, will_be_piped }) { // implementation return new CommandResponse({ /* response data */ }); } );
you can also take a look at the vscode snippets at
.vscode/custom.code-snippets for even more information on how to write commands.
src/events/views/ - Handlebars templates (.handlebars)public/styles/ - CSS files, one per page + main.csssrc/web/pages/ - TypeScript page logicviews/layouts/ - Handlebars layout templatesviews/partials/ - Reusable Handlebars componentsmain.css for base stylescard, spinny-button, side-padding)migrations/src/lib/data_manager.tssrc/lib/alias_manager.ts, or any other "manager" script)src/lib/guild_config_manager.ts.envbun for package management and running scriptsDO NOT use bun to test if changes work. While bun is used for package installation, don't use it to run tests. it's extremely annoying and will not help you in this case. if you want to test changes, ask me to and i will test shit for you.
bun install for dependenciessrc/commands/[command-name].tssrc/events/[event-name].tssrc/lib/[functionality].tssrc/web/pages/[page-name].tssrc/lib/classes/ for shared classesconstants/ for static data