A webhook-based Discord slash command library

Overview

Slashook

A webhook-based Discord slash command library.

This is a WIP project. Please note breaking changes can occur within minor releases until version 1.0.0.

Things to be done

  • REST methods for full API coverage
  • Utility methods
  • More validation library-side
  • Command sync
  • Tests and benchmarks

The gateway (and by extension voice) functionality is out of scope for this project.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

You might also like...
A lightweight Discord wrapper made in Tauri

Discord-Tauri is a work in progress lightweight wrapper for Discord.

A Discord bot for lichess and Rosen related things
A Discord bot for lichess and Rosen related things

liro Liro is a Discord bot that follows in the footsteps of Lichess-discord-bot, without necessarily aiming to replace it. The main pain point that th

Hi I'm Sophy, a discord bot in devlopment, soon I'll be available to help everyone (❁´◡`❁)

Sophy Bot Hi I'm Sophy, a discord bot in devlopment, soon I'll be available to help everyone (❁´◡`❁) Contribution Do you like me and want to help me?

Push BYCEPS ticket sale stats to Discord (as channel name)

Push BYCEPS Ticket Sale Stats to Discord A tool to fetch ticket sale stats for a specific LAN party from a BYCEPS installation and show that as the na

A Discord bot for sending GeoGuessr challenge links that uses the GeoGuessr API written in rust.

GeoGuessr-bot-rs This is a simple implementation of a discord bot that send GeoGuessr-challenge links on demand. Features: Slash-commands Lightning-fa

🦴🤖 // A Discord bot about collecting all the Borpa

🦴 🤖 Borpa Bot Borpa Bot is a Discord bot about collecting all the Borpa possible. If you dont know what a Borpa is you can find it here Crate Descri

twilight-interactions is a set of macros and utilities to work with Discord Interactions using twilight.

Twilight interactions twilight-interactions is a set of macros and utilities to work with Discord Interactions using twilight. Note: This crate is not

A scriptable discord bot (WIP)

Status This project is currently a VERY EARLY WORK IN PROGRESS. Contact me on discord for more details: Jonas747#0001 (105487308693757952) BotLoader (

🦜 A hassle-free, highly performant, host it yourself Discord music bot built with Serenity in Rust. Powered by youtube-dl and Genius.

🦜 A hassle-free, highly performant and fast evolving Discord music bot built with Serenity in Rust. Deployment Usage Just create a bot account, copy

Comments
  • cannot find...`Json` in module `content`

    cannot find...`Json` in module `content`

    This error occurs when compiling:

    error[E0425]: cannot find function, tuple struct or tuple variant `Json` in module `content`
      --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/slashook-0.2.0/src/webhook/mod.rs:43:25
       |
    43 |         .merge(content::Json(json.to_string()).respond_to(req)?)
       |                         ^^^^ not found in `content`
    

    It's using rocket v0.5.0-rc.2 (the version is automatically updated to the later minor version, so it won't stay v0.5.0-rc.1), in which it seems to be RawJson, not Json

    bug 
    opened by noneofyourbusiness1415252 3
Releases(v0.2.1)
  • v0.2.1(Jun 20, 2022)

  • v0.2.0(Feb 18, 2022)

    • Switched to API v10
    • Switched to 2021 edition of rust
    • Message.flags is now an Option<MessageFlags>
    • Application.flags is now an Option<ApplicationFlags>
    • SelectMenu.custom_id is now a String
    • MessageResponse.ephemeral has been replaced with flags
      • set_suppress_embeds(suppress) was also added
    • Followup methods in CommandResponder now have RestError as error type
    • Added support for autocomplete interactions
      • Added values and focused to CommandInput
      • Added autocomplete(results) to CommandResponder
    • Added support for attachment option type and improved attachment support
      • Added attachments and keep_attachment(attachment_id) to MessageResponse
      • Added attachments to InteractionDataResolved
      • Added Attachment, is_attachment() and as_attachment() to OptionValue
      • Added description and set_description(description) to File
      • Added support for sending files within the initial interaction response
    • Added support for modal interactions and text input components
      • Added MODAL_SUBMIT to InteractionTypes
      • Added Modal struct in commands module
      • Added open_modal(modal) to CommandResponder
      • Added TEXT_INPUT to ComponentType
      • Added TextInput and add_text_input(text_input) to Component
    • Added interaction_type, command_type, component_type, locale and guild_locale to CommandInput
    • Added interaction type checking methods to CommandInput
      • is_command()
      • is_chat_input()
      • is_user_context()
      • is_message_context()
      • is_component()
      • is_button()
      • is_select_menu()
      • is_autocomplete()
      • is_modal_submit()
    • Updated Discord object structs
      • Added ephemeral and description to Attachment
      • Added create_timestamp to ThreadMetadata
      • Renamed APPLICATION_COMMAND to CHAT_INPUT_COMMAND and added CONTEXT_MENU_COMMAND in MessageType
      • Added member to MessageActivity
      • Added avatar and communication_disabled_until to GuildMember
      • Added icon and unicode_emoji to Role
      • Permissions:
        • Added MANAGE_EVENTS, SEND_MESSAGES_IN_THREADS, START_EMBEDDED_ACTIVITIES and MODERATE_MEMBERS
        • Renamed USE_PUBLIC_THREADS and USE_PRIVATE_THREADS to CREATE_PUBLIC_THREADS and CREATE_PRIVATE_THREADS respectively
      • UserFlags:
        • DISCORD_EMPLOYEE -> STAFF
        • PARTNERED_SERVER_OWNER -> PARTNER
        • HYPESQUAD_EVENTS -> HYPESQUAD
        • HOUSE_BRAVERY -> HYPESQUAD_ONLINE_HOUSE_1
        • HOUSE_BRILLIANCE -> HYPESQUAD_ONLINE_HOUSE_2
        • HOUSE_BALANCE -> HYPESQUAD_ONLINE_HOUSE_3
        • EARLY_SUPPORTER -> PREMIUM_EARLY_SUPPORTER
        • TEAM_USER -> TEAM_PSEUDO_USER
        • EARLY_VERIFIED_BOT_DEVELOPER -> VERIFIED_DEVELOPER
        • Added CERTIFIED_MODERATOR and BOT_HTTP_INTERACTIONS
    • Started work on adding REST API methods to structs
      • Added rest to CommandInput
      • Added bot_token to Config
      • Added fetch(rest, channel_id, message_id), fetch_many(rest, channel_id, options), create(rest, channel_id, message), edit(rest, message), delete(rest) and crosspost(rest) to Message
    • Fixed some *_type fields not being renamed when (de)serializing
    • Added skipping serialization on embeds, components, attachments and allowed_mentions if None in MessageResponse
    • Added documentation wherever it was missing
    Source code(tar.gz)
    Source code(zip)
    slashook-0.2.0.crate(38.24 KB)
    slashook-macros-0.1.0.crate(2.78 KB)
🥅 Dead simple webhook worker for Sentry to output events in a Discord channel

?? Sentry Webhook Dead simple webhook worker for Sentry to output events in a Discord channel Why? This is just a simple Rust HTTP service to do so, t

Noel 5 Nov 7, 2022
A rust(serenity) based discord bot for the hacksquad discord server

A Discord Bot for Hacksquad How to Deploy? Requirements Docker Docker Compose Steps To Run Copy the docker-compose.yml and .env.example files to your

HackSquad 5 Jan 4, 2023
A Github webhook server to help with CI/CD written in Rust.

This application will automatically updates local GitHub repositories and triggers a command once the update is complete. This can be extremely useful

Luca 9 Apr 4, 2023
Lambda function to handle Bitbucket webhook payloads, extract relevant information and send notifications to Microsoft Teams

PR-Bot Lambda function to handle Bitbucket webhook payloads, extract relevant information, and send notifications to Microsoft Teams, saving you time

Irine 14 Sep 26, 2023
A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers.

ACABot A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers (or "guilds

null 4 May 3, 2022
A little command-line script written in Rust to interface with Discord webhooks.

Rust Discord Webhook Agent This is a little "script" I wrote for practice with Rust and asynchronous operations within Rust. Getting started Clone thi

David Chen 2 Sep 7, 2022
Serenity is a Rust library for the Discord API

serenity Serenity is a Rust library for the Discord API. View the examples on how to make and structure a bot. Serenity supports bot login via the use

serenity 3.3k Jan 2, 2023
Edgelord is a library for Cloudflare Workers. You can scaffold a basic bot for discord, slack, etc.

Edge Computing + chūnibyō = Edgelord ✨ ?? Edgelord Edgelord is now working. You can contribute for it. Edgelord is a Rust library for cloudflare worke

null 23 Dec 26, 2022
A rust library for interacting with multiple Discord.com-compatible APIs and Gateways at the same time.

Chorus A rust library for interacting with (multiple) Spacebar-compatible APIs and Gateways (at the same time). Explore the docs » Report Bug · Reques

polyphony 4 Apr 30, 2023
A simple bot for discord.

Rusky Um simples bot para o discord! ?? Executando ⚠️ Antes de tudo você precisa do Rust Instalado você pode instalar clicando aqui Preparando Primeir

Rusky 3 Aug 12, 2022