Spinel
Spinel
SIASapphire - Imagine a framework
Created by f1fty on 12/22/2024 in #sapphire-support
How to wait that the initialization of the ApplicationCommandRegistry is finished
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stack traces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards. - For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. - For an excellent video that shows how not to ask technical questions, watch this YouTube video by LiveOverflow. - Asking technical questions (Clarkson) - How to ask questions the smart way (Raymond)
5 replies
SIASapphire - Imagine a framework
Created by Shrewd 💫 on 12/5/2024 in #discordjs-support
changed from npm to pnpm, bot doesn't work anymore
When using pnpm you have to make sure that you have the shamefully-hoist and public-hoist-pattern are set correctly in your .npmrc file. This is because pnpm will not hoist any dependencies by default and that poses a problem with how Sapphire works with module augmentation and loading files from the filesystem. Add this to your .npmrc file:
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
40 replies
SIASapphire - Imagine a framework
Created by Bejasc on 12/4/2024 in #sapphire-support
Difference with dev and prod > The application now has 0 global commands
TL;DR: Do not use ts-node, use tsc-watch instead. We very strongly discourage using ts-node because it was never meant to be used for bots. ts-node is designed for REPL purposes. That's short for Read Eval Print Loop. Which means to read some code, dump it in an eval() statement, print the result, and loop. A discord bot is not that. A Discord bot sets up a permanent web socket connection to the Discord server and connects to the rest gateway. There is read yes, but no eval, no print, and no loop. So what should you use instead? The most ideal way is to just use the watch flag of tsc (tsc --watch) and run node dist/index.js to run your bot, then cancel that process and restart it when you have changes that require restarting. You would open 2 terminal tabs, 1 in which you run tsc --watch and another in which you run the bot. This is, in particular, the most ideal way, because Discord has a limit to the amount of times you can log in with your bot, or register commands, per day. Constantly logging in over and over again due to an auto-restarting process will get you close to that limit very quickly and once you exceed it, your development will be halted entirely for the current day. However, this can be quite tedious so a great package to use instead is tsc-watch.
19 replies
SIASapphire - Imagine a framework
Created by Bejasc on 12/4/2024 in #sapphire-support
Difference with dev and prod > The application now has 0 global commands
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
19 replies
SIASapphire - Imagine a framework
Created by grous on 11/29/2024 in #sapphire-support
Why my listener doesn't work?
When using pnpm you have to make sure that you have the shamefully-hoist and public-hoist-pattern are set correctly in your .npmrc file. This is because pnpm will not hoist any dependencies by default and that poses a problem with how Sapphire works with module augmentation and loading files from the filesystem. Add this to your .npmrc file:
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
9 replies
SIASapphire - Imagine a framework
Created by grous on 11/29/2024 in #sapphire-support
Why my listener doesn't work?
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
9 replies
SIASapphire - Imagine a framework
Created by lizard🧚🏼 on 11/21/2024 in #sapphire-support
Sapphire keeps taking me in circles! Can't access my Dashboard.
You seem to be asking a question related to the "Sapphire" bot, not the "Sapphire" framework. These are separate projects that share the same name but have no relation to one another. You may instead be looking for https://discord.gg/EXqShySz8h
4 replies
SIASapphire - Imagine a framework
Created by Otiosum on 11/18/2024 in #sapphire-support
Random date generator
Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics: - Read and understand docs - Debug code - Syntax - NodeJS module system If you aren't sure that your understanding of JavaScript is truly good enough to make a bot, you should try to continue learning first. Here are good resources to learn both Javascript and NodeJS: - Codecademy: https://www.codecademy.com/learn/javascript - Udemy: https://www.udemy.com/javascript-essentials/ - Eloquent JavaScript, free book: http://eloquentjavascript.net/ - You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS - JavaScript Garden: https://bonsaiden.github.io/JavaScript-Garden/ - JavaScript reference/docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference - Nodeschool: https://nodeschool.io/ - Pluralsight: https://www.codeschool.com/courses/real-time-web-with-node-js Before you ask a question, you should ask these yourself: 1. Is this question related to JavaScript, or the library I am using? - If it is the library you are using, go to the proper server. You would get better answers there. 2. Have I tried to google and/or check StackOverflow? - Double-check that you can't find anywhere that can lead you to a solution online. 3. Have I tried to look on MDN or the library documentation? - You should always check documentation to make sure you aren't missing any details. 4. Does my question make enough sense so that people can understand it, and do they understand what I am trying to accomplish? - If no, revise your question. Give as much detail as possible. Include any error or code output that can help us help you. 5. Am I aware of what I am doing, and not just mindlessly copying and pasting? - If you are just copying and pasting code from a guide, you are not going to be able to solve anything. Make sure you understand the code you are writing.
6 replies
SIASapphire - Imagine a framework
Created by -Carlos👑 on 11/2/2024 in #sapphire-support
Context Menu not working
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stack traces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards. - For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. - For an excellent video that shows how not to ask technical questions, watch this YouTube video by LiveOverflow. - Asking technical questions (Clarkson) - How to ask questions the smart way (Raymond)
25 replies
SIASapphire - Imagine a framework
Created by iaqi on 10/30/2024 in #sapphire-support
cant declare container items
When using pnpm you have to make sure that you have the shamefully-hoist and public-hoist-pattern are set correctly in your .npmrc file. This is because pnpm will not hoist any dependencies by default and that poses a problem with how Sapphire works with module augmentation and loading files from the filesystem. Add this to your .npmrc file:
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
17 replies
SIASapphire - Imagine a framework
Created by Haft on 10/13/2024 in #sapphire-support
Connect timeout thing
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
21 replies
SIASapphire - Imagine a framework
Created by Haft on 10/7/2024 in #sapphire-support
commands arent working
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
10 replies
SIASapphire - Imagine a framework
Created by Youssef on 8/31/2024 in #sapphire-support
Coodown
29 replies
SIASapphire - Imagine a framework
Created by Amin on 8/22/2024 in #sapphire-support
node_modules eror
Tag suggestion for @Amin When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stack traces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson)How to ask questions the smart way (Raymond)
7 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
65 replies
SIASapphire - Imagine a framework
Created by smooch pls unblock me on 8/15/2024 in #sapphire-support
events not firing
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
3 replies