Seeking for Guideline

I have used discord commando (command handler) for a while (1.5 years ago), since commando is no more available. I want to migrate in sapphire (refereed). I need a guideline...
8 Replies
Favna
Favna2y ago
Well for starters you're looking at a complete rewrite from scratch. Other than that we have a user guide on https://www.sapphirejs.dev
Sapphire Framework
Home | Sapphire
Sapphire is a next-gen Discord bot framework for developers of all skill levels to make the best JavaScript/TypeScript based bots possible.
Surgical Crow
Surgical CrowOP2y ago
in addition, I am back after 2 years in discord. Many things has changed so far. I'm confused. There are already 10k+ lines of codes. I should start from scratch again with sapphire (that's tough) or transform my code according to sapphire (I want)
Favna
Favna2y ago
correct you'd need to anyway going sapphire to discordjs but you're also going DJS v... 11 I guess? To v14. Which is a huge change all things considered. Even if it wouldn't be for sapphire a complete rewrite would be better
Surgical Crow
Surgical CrowOP2y ago
yah, mine is DJS v.12
const Command = require('../../structures/Command');
const { MessageEmbed } = require("discord.js");

module.exports = class DevsCommand extends Command {
constructor(client) {
super(client, {
name: "guninfo",
aliases: ["gunstats"],
group: "info",
memberName: "guninfo",
description: "shows infos about a free fire Weapon / Gun",
clientPermissions: ["EMBED_LINKS"],
guildOnly: true,
args: [
{
key: "weapon",
type: "string",
prompt: "Which Weapon/Gun's information you want to get?",
}
],
throttling: {
usages: 2,
duration: 10
}
});
}

async run(message, { weapon }) {
...
}
}
const Command = require('../../structures/Command');
const { MessageEmbed } = require("discord.js");

module.exports = class DevsCommand extends Command {
constructor(client) {
super(client, {
name: "guninfo",
aliases: ["gunstats"],
group: "info",
memberName: "guninfo",
description: "shows infos about a free fire Weapon / Gun",
clientPermissions: ["EMBED_LINKS"],
guildOnly: true,
args: [
{
key: "weapon",
type: "string",
prompt: "Which Weapon/Gun's information you want to get?",
}
],
throttling: {
usages: 2,
duration: 10
}
});
}

async run(message, { weapon }) {
...
}
}
this is my old one. a command file
Favna
Favna2y ago
flashbacks to when I used commando
Surgical Crow
Surgical CrowOP2y ago
sorry how would it look for sapphire?
Surgical Crow
Surgical CrowOP2y ago
are those options available in sapphire
Favna
Favna2y ago
they all are yes but sapphire uses a very different structure which is why you'll be rewriting from scratch. See the guide for more info.
Want results from more Discord servers?
Add your server