artibot
Version:
Modern, fast and modular open-source Discord bot
141 lines • 4.68 kB
JavaScript
import { Colors } from "discord.js";
/**
* Easily build the ArtibotConfig object
* @see {@link ArtibotConfig} to learn more about individual properties
* @since 5.0.0
*/
export class ArtibotConfigBuilder {
/** Discord ID of the owner of the bot */
ownerId;
/** ID of the test server */
testGuildId;
/** Name of the bot */
botName = "Artibot";
/** Icon of the bot */
botIcon = "https://assets.artivain.com/fav/bots/artibot-512.png";
/** Prefix for the classic commands */
prefix = "ab ";
/** Set to false if the bot must be used in more than one server. Interactions could take more time to refresh. */
devMode = true;
/** Set the lang of the bot */
lang = "en";
/** Color for the embeds sent by the bot */
embedColor = Colors.Default;
/** Set to false if you want to hide advanced infos from ping commands */
advancedCorePing = true;
/** Set to false to disable checking for updates */
checkForUpdates = true;
/** Set to true to show debug messages in console */
debug = false;
/** Set a custom ready trigger message for Pterodactyl */
pterodactylReadyMessage = "Ready";
/** Set the Discord ID of the owner of this bot (probably you) */
setOwnerId(id) {
this.ownerId = id;
return this;
}
/** Set the test guild ID. When {@link devMode} is false, interactions will only be publish in this guild. */
setTestGuildId(id) {
this.testGuildId = id;
return this;
}
/** Set the name to use in Discord, in {@link Embed} and {@link Artibot.createEmbed} */
setBotName(name) {
this.botName = name;
return this;
}
/** Set the icon to use in {@link Embed} and {@link Artibot.createEmbed} */
setBotIcon(url) {
this.botIcon = url;
return this;
}
/** Set the prefix for classic commands */
setPrefix(prefix) {
this.prefix = prefix;
return this;
}
/** Set dev mode, to allow Artibot to publish interaction in more than one server */
setDevMode(state) {
this.devMode = state;
return this;
}
/** Toggle dev mode, to allow Artibot to publish interaction in more than one server */
toggleDevMode() {
return this.setDevMode(!this.devMode);
}
/** Enable dev mode, to allow Artibot to publish interaction in more than one server */
enableDevMode() {
return this.setDevMode(true);
}
/** Disable dev mode, to allow Artibot to publish interaction in more than one server */
disableDevMode() {
return this.setDevMode(false);
}
/** Set language of the bot (eg. "fr") */
setLang(lang) {
this.lang = lang;
return this;
}
/** Set the color of {@link Embed} and {@link Artibot.createEmbed} */
setEmbedColor(color) {
this.embedColor = color;
return this;
}
/** Set "advanced" stats in the ping command in Core module */
setAdvancedCorePing(state) {
this.advancedCorePing = state;
return this;
}
/** Toggle "advanced" stats in the ping command in Core module */
toggleAdvancedCorePing() {
return this.setAdvancedCorePing(!this.advancedCorePing);
}
/** Enable "advanced" stats in the ping command in Core module */
enableAdvancedCorePing() {
return this.setAdvancedCorePing(true);
}
/** Disable "advanced" stats in the ping command in Core module */
disableAdvancedCorePing() {
return this.setAdvancedCorePing(false);
}
/** Set checking for updates */
setCheckForUpdates(state) {
this.checkForUpdates = state;
return this;
}
/** Toggle checking for updates */
toggleCheckForUpdates() {
return this.setCheckForUpdates(!this.checkForUpdates);
}
/** Enable checking for updates */
enableCheckForUpdates() {
return this.setCheckForUpdates(true);
}
/** Disable checking for updates */
disableCheckForUpdates() {
return this.setCheckForUpdates(false);
}
/** Set debug mode */
setDebug(state) {
this.debug = state;
return this;
}
/** Toggle debug mode */
toggleDebug() {
return this.setDebug(!this.debug);
}
/** Enable debug mode */
enableDebug() {
return this.setDebug(true);
}
/** Disable debug mode */
disableDebug() {
return this.setDebug(false);
}
/** Set the message sent to Pterodactyl when the bot is ready */
setPterodactylReadyMessage(message) {
this.pterodactylReadyMessage = message;
return this;
}
}
//# sourceMappingURL=config.js.map