Argument of type '"Staff"' is not assignable to parameter of type 'SimplePreconditionKeys | Simpl...
Error
14 Replies
preconditions/Staff.ts
Trainee is pretty much the same
I have no idea why the error is popping up
I think its the same error as
https://discord.com/channels/737141877803057244/737142503043498015/897088844275544104
do you happen to be using pnpm or yarn v2/3 with PnP mode by any chance?
nope
im using npm v8.5.1
hold on where is this
container.append
stuff?
because that's not how you define preconditions for a commandSapphire Framework
Creating your own preconditions | Sapphire
Just as we did in Creating Commands, we will start by creating a preconditions subdirectory in
I have a hunch that you're copying @Skyra's design here and I can already tell you that just because @Skyra does it, doesn't mean it's good design. You're far better off just sticking to what Sapphire would normally ask you to do in structure.
that said, if you do insist on copying the design then copy better. You cannot try to copy only half of the things and expect it to work. For example you have to consider what Skyra actually exactly does
Yes there are appends here: https://github.com/skyra-project/skyra/blob/main/src/lib/structures/commands/SkyraCommand.ts#L44-L76
But also consider how it creates the container
And consider how augments are done: https://github.com/skyra-project/skyra/blob/main/src/lib/types/Augments.d.ts#L83-L89
And many more alike
----
Also as a side note, think about whether you really need yet another moderation bot. There are already thousands out there and you're not adding anything unique to the bot pool by creating yet another one. You're far better off trying to find some kind of unique niche to fill.
I had no idea that @Skyra does that, i was copying https://github.com/EvolutionX-10/Radon
ah well Radon copied it from Skyra
I realise that now, but i dont see anywhere where augments are done in radon
im just curios how radon does it
no idea
Discord bots that use @sapphire/framework v4
- Official Bot Examples ᴱ ᴰ ᴶˢ
- Gemboard ᴱ ᴰ
- Dragonite ᴱ ᴰ
- Radon ᴱ ᴬ
- Sapphire Application Commands Examples ᴱ
- Archangel ᴱ ᴰ
Discord bots that use @sapphire/framework v3
- Arima ᴱ
- Nino ᴱ ᴰ
- Operator ᴱ ᴬ ᴰ
- Spectera ᴬ
Discord bots that use @sapphire/framework v2
- Materia ᴱ
- RTByte ᴱ ᴬ
- Skyra ᴬ ᴰ
- YliasDiscordBot ᴬ
ᴱ: Uses ESM (if not specified then uses CJS)
ᴬ: Advanced bot (if not specified it is a simple bot, or not graded)
ᴰ: Uses Docker in production
ᴶˢ: Written in JavaScript. If not specified then the bot is written in TypeScript.
@Evo rewrite Radon to have a better precondition system when™️
aaanyyywaaayyy
anyways, thanks for the support. i think i found out how radon does it. im just tryna see how some bots are made with sapphire so that i can rewrite my old bot in sapphire later. i have no intent to fully copy radon or make yet another moderation bot, my old bot was a stats bot
I assume it works for @Evo so there, mentioned twice, you can ask him