Убираем хардкод и загатовки на будущее

This commit is contained in:
JonnyBro 2022-04-01 17:57:58 +05:00
parent 7762cd124f
commit b7d90d4610
6 changed files with 10 additions and 10 deletions

View file

@ -63,7 +63,7 @@ class Profile extends Command {
})
})
.setImage("attachment://achievements.png")
.addField(this.client.customEmojis.link + " " + message.translate("economy/profile:LINK"), `[${message.translate("economy/profile:LINK_TEXT")}](https://jaba.pp.ua/user/${member.user.id}/${message.guild.id})`)
.addField(this.client.customEmojis.link + " " + message.translate("economy/profile:LINK"), `[${message.translate("economy/profile:LINK_TEXT")}](${this.client.config.dashboard.baseURL}/user/${member.user.id}/${message.guild.id})`)
.addField(message.translate("economy/profile:BIO"), userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO"))
.addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)

View file

@ -91,9 +91,9 @@ class Help extends Command {
}
embed.addField("\u200B", message.translate("misc:STATS_FOOTER", {
dashboardLink: "https://jaba.pp.ua/",
docsLink: "https://jaba.pp.ua/docs/",
inviteLink: this.client.generateInvite({ scopes: ["bot"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }),
dashboardLink: this.client.config.dashboard.baseURL,
docsLink: `${this.client.config.dashboard.baseURL}/docs/`,
inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }),
donateLink: "https://qiwi.com/n/JONNYBRO/",
owner: data.config.owner.id
}));

View file

@ -19,7 +19,7 @@ class Invite extends Command {
async run(message, args, data) {
const inviteLink = this.client.generateInvite({
scopes: ["bot"],
scopes: ["bot", "applications.commands"],
permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR]
});
const donateLink = "https://qiwi.com/n/JONNYBRO/";

View file

@ -41,7 +41,7 @@ class Serverinfo extends Command {
.setThumbnail(guild.iconURL({
dynamic: true
}))
.addField(this.client.customEmojis.link + " " + message.translate("general/serverinfo:LINK"), `[${message.translate("general/serverinfo:LINK_TEXT")}](https://jaba.pp.ua/stats/${guild.id})`)
.addField(this.client.customEmojis.link + " " + message.translate("general/serverinfo:LINK"), `[${message.translate("general/serverinfo:LINK_TEXT")}](${this.client.config.dashboard.baseURL}/stats/${guild.id})`)
.addField(this.client.customEmojis.title + message.translate("common:NAME"), guild.name, true)
.addField(this.client.customEmojis.calendar + message.translate("common:CREATION"), message.printDate(guild.createdAt), true)
.addField(this.client.customEmojis.users + message.translate("common:MEMBERS"),

View file

@ -48,9 +48,9 @@ class Stats extends Command {
translators: ["**`Jonny_Bro#4226`** - :flag_ru:", "**`[ДАННЫЕ УДАЛЕНЫ]#4507`** - :flag_ua:"].join("\n")
}))
.addField(this.client.customEmojis.link + " " + message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", {
dashboardLink: "https://jaba.pp.ua/",
docsLink: "https://jaba.pp.ua/docs/",
inviteLink: this.client.generateInvite({ scopes: ["bot"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }),
dashboardLink: this.client.config.dashboard.baseURL,
docsLink: `${this.client.config.dashboard.baseURL}/docs/`,
inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }),
donateLink: "https://qiwi.com/n/JONNYBRO/",
owner: data.config.owner.id
}));

View file

@ -14,7 +14,7 @@ module.exports = class {
// Logs some informations using logger
client.logger.log(`Loading a total of ${client.commands.size} command(s).`, "log");
client.logger.log(`${client.user.tag}, ready to serve ${tUsers} users in ${tServers} servers.`, "ready");
client.logger.log(`Invite Link: ${client.generateInvite({ scopes: ["bot"] , permissions: [Permissions.FLAGS.ADMINISTRATOR] })}`, "ready");
client.logger.log(`Invite Link: ${client.generateInvite({ scopes: ["bot", "applications.commands"] , permissions: [Permissions.FLAGS.ADMINISTRATOR] })}`, "ready");
// Discord Together
const discordtogether = require("../helpers/discordTogether");