Crates.io | serenity-slash-decode |
lib.rs | serenity-slash-decode |
version | 0.1.2 |
source | src |
created_at | 2021-07-31 00:20:01.428711 |
updated_at | 2021-08-28 03:56:19.960291 |
description | Abstraction layer to help with handling slash commands in Serenity |
homepage | |
repository | https://github.com/squili/serenity-slash-decode |
max_upload_size | |
id | 429475 |
size | 48,431 |
After banging my head against a wall trying to get
slash commands to make sense in
Serenity, in addition to the impending
Discord intent changes, I decided to make a library
to help with easier parsing of command arguments. Inspired by Clap's ArgMatches
, you're able to
parse arguments in one call, match which function to execute for which interaction, and extract values from the
arguments. You're even able to use ?
s to exit early from your command's individual function.