Commit Graph

20 Commits

Author SHA1 Message Date
Max
8b673c734f fix: add missing import "PermissionsBitField" (#117)
Update subcommandPermCheck.ts
2024-08-01 08:25:41 -05:00
Jacob Nguyen
c9c419f0bc hope dis works (#116)
* hope dis works

* exposemap

* update doc

* doc

* yea

* more fixes
2024-07-23 21:42:49 -05:00
Peter-MJ-Parker
486973dfac edit: fix option finding (#115)
When using for...of loops, it was looking at the first item in the list and grabbing the perms for it instead of the correct item in the list. Now it is finding the correct items to return the correct permissions for the missing permissions.
2024-07-14 21:59:10 -05:00
Max
30fb45fdc5 yep @sern-handler (#114)
* fix error handling in subcommandPermCheck

This edit fixes the error "<subcommandName> not found on command: <commandName>." it was finding the incorrect subcommand from the list vs the command subcommands.

* fix error handling in permCheck

Errors were not being thrown in the correct manner. This edit will filter through the command subcommandgroups and subcommands to validate the listed names in the plugin. Originally, the plugin would only search for the first subcommandgroup or subcommand and try to match to an in the list.
2024-07-14 21:22:36 -05:00
Peter-MJ-Parker
6309184189 feat: Create subcommandPermCheck plugin (#113)
* feat: Create subcommandPermCheck plugin

This plugin was requested to be uploaded for basic sub command permission handling. Only available for slash commands and will fault out for other command types.

* edit: resolve conflicts

Removed deconstructed interaction
Made errors more understandable
Corrected the example to use a parameter as the first object and input correct properties.

---------

Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
2024-07-10 21:46:27 -05:00
Peter-MJ-Parker
21d18bb8eb chore: Update permCheck.ts (#112)
* chore: Update permCheck.ts

Allows users to check member perms before using specific sub command groups, sub commands, and options!

* edit: permCheck - revert back to a function

Reverted permCheck back to a function to avoid breaking changes.

* edit: permCheck.ts

Remove console logs

* formatting permCheck.ts

* edit: Update permCheck.ts

Fixed overall formatting
simplified ephemeral booleans
No longer destructuring interaction from ctx
fixed in guild from not fully returning controller.stop()
remove `no_guild` function in favor of hard coding
imported type CommandType

* edit: Update permCheck.ts

Remove ALL destructures `({ ctx })` --> `(ctx)`

* edit: Update permCheck.ts 

edit response for not being in guild

* edit: permCheck - assigned to object

Remove all breaking changes while maintaining integrity of new features as well as original!

* edit: permCheck - remove un-needed code.

Thanks to Duro for simplifying the code into one function!

---------

Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
2024-07-09 15:43:36 -05:00
Jacob Nguyen
d356f68598 Update filter.ts (#111) 2024-05-06 00:13:02 -05:00
Peter-MJ-Parker
f5923ecd0b chore: update disable.ts (#110)
Noticed a few bugs.
1) Changed invalid import from discord.js. Implicitly had an any type for `onFail`.
```diff
-ReplyMessageOptions
+MessageReplyOptions
```
2) Corrected the improper catching of errors by implementing try/catch blocks. Included more detailed error responses.
3) Default reply for slash with onFail inputted was invalid because it could also be a string.
2024-02-23 11:18:10 -06:00
Jacob Nguyen
6d018ea060 feat: fromCallback.ts (#109) 2024-01-04 14:38:22 +05:30
e4312cd1ad fix: deprecated enums by discord.js (#108)
* fix: deprecated enums by discord.js

* chore: change version
2023-10-25 15:05:23 -05:00
Jacob Nguyen
cb221ae7ff fix(assertFields): comment update (#105) 2023-09-20 21:02:19 +05:30
EvolutionX
1393f79d9a chore: noval sucks
permalink: http://whatthecommit.com/0a95e95262a10379dc986dabcc217c99
2023-09-02 12:56:56 +05:30
EvolutionX-10
d307d4dc45 style: run prettier
Signed-off-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-02 06:12:08 +00:00
EvolutionX
0812117ba0 chore: corrected mistakes
permalink: http://whatthecommit.com/e3da640ecb1a8202b137447209380f9e
2023-09-02 11:41:42 +05:30
EvolutionX
e55e1adf31 chore: removed tests since i can't make them green
permalink: http://whatthecommit.com/2461c2e5456a9e486c1a2207f0efdd43
2023-09-02 11:37:54 +05:30
EvolutionX
dac447d3ac chore: woa!! this one was really hard!
permalink: http://whatthecommit.com/29b1b6ea198a584830edff869fd970f3
2023-09-02 11:36:05 +05:30
EvolutionX-10
efd52f5357 style: run prettier
Signed-off-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-02 06:03:11 +00:00
EvolutionX
44e151d414 chore: i had a cup of tea and now it's fixed
permalink: http://whatthecommit.com/75f9d31192425512ef21e07a20f3390b
2023-09-02 11:32:47 +05:30
EvolutionX
33397c04e8 chore: testing 2023-09-02 11:19:06 +05:30
Evo
877291964c feat: awesome automations (#104) 2023-09-02 10:59:59 +05:30