A slash commands bot using guild commands as a custom commands alternative.

Overview

hack-n-slash

A slash commands bot using guild commands as a custom commands alternative.

This service uses slash-create to handle slash commands and redis as a storage provider.

Custom commands use Tempura to handle the command logic.

{{#expect ...}} is called before the rest of the template is compiled and run.

When searching for existing commands (update, info, delete), the service will return the top 20 matches.

You can invite the universal deployment here.

License

All I ask is that you follow the given LICENSE.

Do not add your own instance to a bot list, while I won't actively hunt you down - most or all lists do not allow direct copies.

Consider this your only warning.

Context (Incomplete listing)

Full list of data available in the context

  • ...data:
  • interactionID: The ID of the interaction.
  • guildID: The ID of the guild.
  • channelID: The ID of the channel.
  • command: The command entry found from the database.
  • users, members, roles, channels, messages - all resolved by ID.
  • targetMember, targetUser, targetMessage - are dependent on the command being run (user, user, message respectively).

Feature requests

  • Additional context blocks
  • Custom context blocks
  • Permission handling - Discord has announced to rework the integration page, very unlikely that this will be implemented.
  • Command aliases - Not physically possible.
  • Command cooldowns - Maybe... though would end up being completely optional - set after creation.
  • Message Options
    • Components
    • Command Arguments
    • Subcommands
    • Rich Embeds
Comments
  • Custom SCs flow

    Custom SCs flow

    Each custom slash command can theoretically be registered and called within the given context - regardless if there is a command file to support it. My thinking is (or was) that it held itself up when trying to run commands from the global or core structure.

    Event for commandInteraction was disabled as of 14ca478 in attempt to determine the source.

    bug 
    opened by sudojunior 2
  • Bump tempura from 0.3.2 to 0.4.0

    Bump tempura from 0.3.2 to 0.4.0

    Bumps tempura from 0.3.2 to 0.4.0.

    Release notes

    Sourced from tempura's releases.

    v0.4.0

    Breaking

    • Security Fix: Ensure esc always returns a string: 58a5c36 NOTE: This should only be a breaking change if you used esc directly. Previously, any non-string input was returned as is. Now, everything is returned as a string. This change prevents XSS attacks within Array values:

      let html = '<div>' + tempura.esc(['<img src=x onerror="alert(1)" />']) + '<div>';
      // before: '<div><img src=x onerror="alert(1)" /></div>'
      // after: '<div>&ltimg src=x onerror=&quot;alert(1)&quot; /></div>'
      

    Full Changelog: https://github.com/lukeed/tempura/compare/v0.3.2...v0.4.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Command Structure

    Command Structure

    Each command requires...

    • a type being chat; user or message respectively
    • a name that matches the given requirements of it's context up to 32 characters
    • a description up to 100 characters

    Another theory that may help resolve the blocking issue may be that a property not included before was holding up the process, although I have yet to test the service methods.

    The database itself using pouchdb is makeshift at best, which may be why it's not handled correctly (if the db returns a 404, the error is uncaught and likely held in the process indefinitely).

    // pouchdb 404 sample response
    const response = {
      status: 404,
      error: true,
      reason: 'missing',
      docId: '1'
    }
    
    bug documentation 
    opened by sudojunior 1
  • Custom SC check before core execution

    Custom SC check before core execution

    Fixes #5

    • check service for a possible command based on the provided ID
      • invert the outcome if found to be true - therefore skipping core command execution
    opened by sudojunior 0
  • Slash Commands conflict

    Slash Commands conflict

    At present, global scoped commands are priortised above anything else, meaning if there's a guild command with the exact name and type of a global command - the global scope will take priority.

    bug 
    opened by sudojunior 0
  • Swap data provider (again)

    Swap data provider (again)

    There appears to be problems with how removal of custom commands function in the backend. Registering the command itself is fine, but the coroutine freezes before it reaches a logging step. Redis is a reasonable contender given that there is only one data model and they can be given prefixes to find them later on (either by absolute or wildcard query).

    I'm not too concerned about performance or scalability at this stage, considering it is closer to an R&D project in how guild slash commands and autocomplete options could be used.

    opened by sudojunior 0
Owner
Junior
He/him, Game Dev Student / Software Engineer. Using JavaScript and Git. Learning C++ and Unreal. Interested in player decisions and data structure.
Junior
It is a discord (/) commands bot developed with Discord.js v13.

#Discord.js v13 Slash Bot #Discord Server ?? Setup Run the setup.bat file. Wait until the process is finished. Go to discord.dev page. Create a bot. C

clqu 30 Dec 23, 2022
Cross-platform Linux commands in ES6

Cross-platform Linux commands in pure ES6 Cash is a cross-platform implementation of Unix shell commands written in straight ES6. No native compiling

dc 7.8k Dec 27, 2022
Execute shell commands in terminal

Execute shell commands in terminal

skanehira 9 Dec 11, 2021
A small Discord moderation bot, without a command handler

A small Discord moderation bot, without a command handler Getting started (Add Star ⭐ <3) ?? Requirements Node.js A code editor (visual studio code, a

null 10 Mar 12, 2022
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
rtail(1) - Terminal output to the browser in seconds, using UNIX pipes.

rtail(1) Terminal output to the browser in seconds, using UNIX pipes. rtail is a command line utility that grabs every line in stdin and broadcasts it

Kilian Ciuffolo 1.6k Jan 6, 2023
:white_square_button: WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer

Whatspup Use Whatsapp from commandline/console/cli using GoogleChrome puppeteer! ?? Features ✅ Send and receive messages ✅ Read Receipts ✅ Switch betw

Sarfraz Ahmed 343 Dec 1, 2022
A CLI for peer-to-peer file sharing using the Hypercore Protocol.

A CLI for peer-to-peer file sharing (and more) using the Hypercore Protocol.

Hypercore Protocol 207 Dec 30, 2022
DataENV is a cli tool that allows you to save data temporarily using your terminal.

DataEnv CLI Instllation npm install -g dataenv Usage Table of Contents LocalStorage npx dataenv save Parameters npx dataenv show Parameters npx dataen

PGamerX 2 Feb 5, 2022
Keep track of book descriptions on the server-side using MongoDB, Express, and Node.js.

Backend Application A database model/backend for a user directory using Javascript MongoDB, Express, and Node.js. In summary, a backend CRUD model to

Rodrigo Bravo 3 Apr 10, 2022
SlashCommands-Bot - An advanced discord bot, with Slash Commands !

SlashCommands Bot Github post is a discord bot handler with slashcommands in v13 How to install ? You need to have Node.JS 16+ git clone https://githu

null 9 Nov 16, 2022
A discord bot to track "owo", usually used to help with OwO bot. Made with Discord.js v13 includes Slash commands, Leaderboards, Auto Resets etc.

Discord-OwO-tracker A discord bot to track "owo", usually used to help with OwO bot Requirements Discord.js v13 (npm install discord.js@latest) applic

Astrex 4 Nov 24, 2022
Discord.js bot starter template, Slash Commands only (Raymond forced me to make a bot template)

boat-template Raymond forced me to make a bot template This template is meant is just for stupidness ig Getting Started Rename the config.example.ts t

Drxckzyz tha idiot 3 Jan 5, 2022
A simple Multi Guild Modmail Bot coded in v13 using the enmap Database Working on any host, like repl.it or vps! Its fast and working bug free + Security options!

Multiguild-Modmail A simple Multi Guild Modmail Bot coded in v13 using the enmap Database Working on any host, like repl.it or vps! Its fast and worki

Tomato6966 54 Oct 20, 2022
An easy-to-use discord bot including database, slash commands and context menus !

Discord Bot Template An easy-to-use discord bot using Discord.JS V13. Wiki Includes: Slash commands Database User commands and more in future Requirem

Gonz 108 Dec 28, 2022
Typescript Discord Bot Supporting Slash Commands.

Typescript Discord Bot Supporting Slash Commands.

Andrew Von Stieglitz 1 Jan 22, 2022
A feature-rich Giveaway Bot For Discord Written In Discord.js v13. Ft. Slash Commands & Buttons. Make Giveaways and…

Giveaway - Discord Bot A feature-rich Giveaway Bot For Discord Written In Discord.js v13. Ft. Slash Commands. Make Giveaways and more..! Explore the d

Chethan Yadav 27 Dec 5, 2022
A Discord bot Template made with Discord.JS version 14 includes Prefix, Slash commands and MongoDB handler.

Project Language: Fork/Download for: Project Requirements: Database Available: DiscordJS V14 Bot Template - Introduction: A Discord bot project made w

T.F.A 105 Jan 3, 2023
Um bot discord usando Discord.js v14 (slash commands)

ANTES DE TUDO LEMBRE-SE: COPIAR CÓDIGOS NÃO É PROGRAMAR! USE APENAS PARA FINS EDUCATIVOS E QUE APRENDA COM ESSE REPOSITÓRIO!!! Descrição Fiz esse repo

Yurii 8 Dec 20, 2022
A documentation bot built using slash-create for its documentation, functionality derived from Eris Docs bot.

docs-bot A service that handles navigation of a docgen project manifest. Commands All arguments are required. $ npx slash-up list /docs - Search docu

/create 4 Dec 15, 2022