update default prefix

This commit is contained in:
derpystuff 2023-11-15 20:24:43 +01:00
parent 8c8e3ab097
commit 1d3f789e8a
4 changed files with 15 additions and 11 deletions

View file

@ -1,7 +1,7 @@
const { codeblock, icon, link, pill, smallPill, iconPill } = require('../../../labscore/utils/markdown')
const { createEmbed, formatPaginationEmbeds, page } = require('../../../labscore/utils/embed')
const { DISCORD_INVITES, DEFAULT_BOT_PREFIX } = require('../../../labscore/constants')
const { DISCORD_INVITES, DEFAULT_PREFIXES } = require('../../../labscore/constants')
const { paginator } = require('../../../labscore/client');
const { editOrReply } = require('../../../labscore/utils/message');
@ -13,7 +13,7 @@ function createHelpPage(context, title, contents, descriptions) {
return page(createEmbed("default", context, {
description: `${title}\n\n` +
renderCommandList(contents, descriptions) +
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_BOT_PREFIX}help <command>`)} to view more information about a command.`
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help <command>`)} to view more information about a command.`
}))
}
@ -136,7 +136,7 @@ module.exports = {
for (const k of Object.keys(resultScores)) results.push(resultMappings[k])
let pages = []
let prefix = DEFAULT_BOT_PREFIX
let prefix = DEFAULT_PREFIXES[0]
try {
if (results.length == 0) return editOrReply(context, createEmbed("warning", context, "No commands found for the provided query."))

View file

@ -3,9 +3,9 @@ const { editOrReply } = require('../../../labscore/utils/message')
const superagent = require('superagent');
const { codeblock } = require('../../../labscore/utils/markdown');
const { DEFAULT_BOT_PREFIX } = require('../../../labscore/constants');
const { Permissions } = require("detritus-client/lib/constants");
const { DEFAULT_PREFIXES } = require('../../../labscore/constants');
const SIZES = Object.freeze({
"wallpaper": { x: 1920, y: 1200},
@ -94,7 +94,7 @@ module.exports = {
"embeds": [
createEmbed("image", context, {
url: res.hash,
description: `${codeblock(`py`, [`${DEFAULT_BOT_PREFIX}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`,
description: `${codeblock(`py`, [`${DEFAULT_PREFIXES[0]}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`,
time: ((Date.now() - timings) / 1000).toFixed(2)
})
]
@ -105,7 +105,7 @@ module.exports = {
return await editOrReply(context, {
embeds: [createEmbed("image", context, {
url: res.hash,
description: `${codeblock(`py`, [`${DEFAULT_BOT_PREFIX}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`,
description: `${codeblock(`py`, [`${DEFAULT_PREFIXES[0]}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`,
time: ((Date.now() - timings) / 1000).toFixed(2)
})],
files: [{ filename: res.hash, value: image.body }]

View file

@ -1,7 +1,7 @@
const { Constants, ClusterClient, CommandClient, InteractionCommandClient } = require('detritus-client');
const { ActivityTypes, PresenceStatuses, GatewayIntents, Permissions, ClientEvents } = require('detritus-client/lib/constants');
const { PERMISSIONS_TEXT, DEFAULT_BOT_PREFIX, DEFAULT_BOT_NAME } = require('./constants');
const { PERMISSIONS_TEXT, DEFAULT_BOT_NAME, DEFAULT_PREFIXES } = require('./constants');
const Paginator = require('./paginator').PaginatorCluster
const cluster = new ClusterClient("", {
@ -17,8 +17,8 @@ const cluster = new ClusterClient("", {
],
presence: {
activity: {
state: `${DEFAULT_BOT_PREFIX}help ${DEFAULT_BOT_NAME}`,
name: `${DEFAULT_BOT_PREFIX}help ​• ${DEFAULT_BOT_NAME}`,
state: `${DEFAULT_PREFIXES[0]}help ${DEFAULT_BOT_NAME}`,
name: `${DEFAULT_PREFIXES[0]}help ​• ${DEFAULT_BOT_NAME}`,
emoji: {
name: "🧪"
},
@ -38,7 +38,7 @@ module.exports.paginator = new Paginator(cluster, {
// Clients
let commandPrefixes = ['lc.', 'ic.', 'lc..'] // Migration from beta -> main, remove lc.. eventually
commandPrefixes = DEFAULT_PREFIXES
if(process.env.PREFIX_OVERRIDE) commandPrefixes = process.env.PREFIX_OVERRIDE.split('|');
const commandClient = new CommandClient(cluster, {

View file

@ -3,9 +3,13 @@ module.exports.DISCORD_INVITES = Object.freeze({
privacy: "https://discord.gg/sQs8FhcTGh"
})
module.exports.DEFAULT_BOT_PREFIX = 'lc.'
module.exports.DEFAULT_BOT_NAME = 'labsCore'
// The first prefix in this list is considered the
// default prefix and will be displayed in various
// places throughout the app
module.exports.DEFAULT_PREFIXES = ['lc.', 'ic.', 'pb.']
module.exports.PRIVACY_POLICY_SECTIONS = [
'### Summary\n- We do not store or collect information about our users or their servers.\n- We do share data with third parties that isn\'t strictly necessary to operate certain functionality.',
'### The information we collect\nWe use technology to log unexpected issues that may occur when interacting with our application. These logs are only shared with the developers of the application and not accessible to the public. Logged information includes:\n- Your username, server and channel\n- The command you executed, as well as its arguments (excluding images)',