Hardstyle
Hardstyle
SIASapphire - Imagine a framework
Created by Hardstyle on 3/22/2024 in #sapphire-support
Interaction
ok ok i got it , i was near of what i got then
7 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
o k , i got that thing to work , but now i got the other problem that is hte discord limitation , so ihave to change my plan and go on a pagination system with embed and stuff
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
No description
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
.addStringOption((option) => {
const data = JSON.parse(
fs.readFileSync("src/assets/donnees.json", "utf8")
);
const countryTags = data.country.map(
(country: { description: string; tag: string }) => ({
name: country.description,
value: country.tag,
})
);

const choice = countryTags.map((tag) => tag.value);

return option
.setName("tag")
.setDescription("The name of the campaign")
.setChoices(choice)
.setRequired(true);
}
.addStringOption((option) => {
const data = JSON.parse(
fs.readFileSync("src/assets/donnees.json", "utf8")
);
const countryTags = data.country.map(
(country: { description: string; tag: string }) => ({
name: country.description,
value: country.tag,
})
);

const choice = countryTags.map((tag) => tag.value);

return option
.setName("tag")
.setDescription("The name of the campaign")
.setChoices(choice)
.setRequired(true);
}
this , doesnt work , i try to get all my " tag " field from a json file ( typically a country.tag ) , but i cant get it work to have all my tag into the choice
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
i'm against a wall on a thing , prob a dumb shit stuff to do and i guess the way i'm trying to do it is not good , and i have to do it an other way
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
will be hard to manually add them all
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
eu4 got 974 country with a XXX TAG , and i need to get all of them in my select menu xd
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
oof , now i need to do a little script for something xd
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
found out i need to use string option for that last part
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
yeah , subcommand is like /join(name of the file as the base) , in my case will give me choice between list or campaign , then in campaign i want to have gameid and a tag select menu
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
got it , its the addStringOption i need to use , to have multiple thing
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
i see thgat its not doing what i want tho , so i'm still searching for the on i would need to use
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
like this , i would be able to do /join , select greet command , and select my user , then select the user i want to greet ( or whatever i want to do there ) , but i cant add more option after this again
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
.addSubcommandGroup(
(subcommandGroup) =>
subcommandGroup
.setName("greet")
.setDescription("Greet a user")
.addSubcommand(
(subcommand) =>
subcommand
.setName("me")
.setDescription("Greet the user")
.addStringOption((option) =>
option
.setName("name")
.setDescription("The user's name")
.setRequired(true)
)
)
)
.addSubcommandGroup(
(subcommandGroup) =>
subcommandGroup
.setName("greet")
.setDescription("Greet a user")
.addSubcommand(
(subcommand) =>
subcommand
.setName("me")
.setDescription("Greet the user")
.addStringOption((option) =>
option
.setName("name")
.setDescription("The user's name")
.setRequired(true)
)
)
)
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
, for the subcommandgroup , are we limited to 2 " choice " after it ?
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
Then wait for a process to be dpne and make a bunch of api call , database register info
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
Cauz i will have to send a file to an api trought a command
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
With file interaction and stuff
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
I will take a look at more specific stuff zbout command today i guess
104 replies
SIASapphire - Imagine a framework
Created by Hardstyle on 2/17/2024 in #sapphire-support
new to sapphirejs and discord bot overhaul
Yeah o was asking cauz a lot of tuto and bot ive checked use mongo , but seen skyra and other using postgres , so i setup my prisma instance on postgres inside docker container
104 replies