mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-06-04 09:03:50 -04:00
update links to be driven by config, update strings to use bot name from config
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
import apiCommands from './apiCmd/_index.ts';
|
||||
import { failColor } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
import config from '../../config.ts';
|
||||
|
||||
export const api = async (message: DiscordenoMessage, args: string[]) => {
|
||||
// Light telemetry to see how many times a command is being run
|
||||
@@ -74,8 +75,7 @@ export const api = async (message: DiscordenoMessage, args: string[]) => {
|
||||
{
|
||||
color: failColor,
|
||||
title: 'API commands are powerful and can only be used by guild Owners and Admins.',
|
||||
description:
|
||||
'For information on how to use the API, please check the GitHub README for more information [here](https://github.com/Burn-E99/TheArtificer).',
|
||||
description: `For information on how to use the API, please check the GitHub README for more information [here](${config.links.sourceCode}).`,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -7,59 +7,60 @@ import { infoColor1, infoColor2 } from '../../commandUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
export const help = (message: DiscordenoMessage) => {
|
||||
message.send({
|
||||
embeds: [
|
||||
{
|
||||
color: infoColor2,
|
||||
title: "The Artificer's API Details:",
|
||||
description:
|
||||
`The Artificer has a built in API that allows user to roll dice into Discord using third party programs. By default, API rolls are blocked from being sent in your guild. The API warning is also enabled by default. These commands may only be used by the Owner or Admins of your guild.
|
||||
message
|
||||
.send({
|
||||
embeds: [
|
||||
{
|
||||
color: infoColor2,
|
||||
title: `${config.name}'s API Details:`,
|
||||
description: `${config.name} has a built in API that allows user to roll dice into Discord using third party programs. By default, API rolls are blocked from being sent in your guild. The API warning is also enabled by default. These commands may only be used by the Owner or Admins of your guild.
|
||||
|
||||
For information on how to use the API, please check the GitHub README for more information [here](https://github.com/Burn-E99/TheArtificer).
|
||||
For information on how to use the API, please check the GitHub README for more information [here](${config.links.sourceCode}).
|
||||
|
||||
You may enable and disable the API rolls for your guild as needed.`,
|
||||
},
|
||||
{
|
||||
color: infoColor1,
|
||||
title: 'Available API Commands:',
|
||||
fields: [
|
||||
{
|
||||
name: `\`${config.prefix}api help\``,
|
||||
value: 'This command',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api status\``,
|
||||
value: 'Shows the current status of the API for the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api allow/enable\``,
|
||||
value: 'Allows API Rolls to be sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api block/disable\``,
|
||||
value: 'Blocks API Rolls from being sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api delete\``,
|
||||
value: "Deletes this channel's settings from The Artificer's database",
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api show-warn\``,
|
||||
value: 'Shows the API warning on all rolls sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api hide-warn\``,
|
||||
value: 'Hides the API warning on all rolls sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}).catch((e: Error) => utils.commonLoggers.messageSendError('apiHelp.ts:67', message, e));
|
||||
},
|
||||
{
|
||||
color: infoColor1,
|
||||
title: 'Available API Commands:',
|
||||
fields: [
|
||||
{
|
||||
name: `\`${config.prefix}api help\``,
|
||||
value: 'This command',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api status\``,
|
||||
value: 'Shows the current status of the API for the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api allow/enable\``,
|
||||
value: 'Allows API Rolls to be sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api block/disable\``,
|
||||
value: 'Blocks API Rolls from being sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api delete\``,
|
||||
value: `Deletes this channel's settings from ${config.name}'s database`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api show-warn\``,
|
||||
value: 'Shows the API warning on all rolls sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}api hide-warn\``,
|
||||
value: 'Hides the API warning on all rolls sent to the channel this was run in',
|
||||
inline: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
.catch((e: Error) => utils.commonLoggers.messageSendError('apiHelp.ts:67', message, e));
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '../../../deps.ts';
|
||||
import { failColor, successColor } from '../../commandUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
import config from '../../../config.ts';
|
||||
|
||||
export const deleteGuild = async (message: DiscordenoMessage) => {
|
||||
let errorOut = false;
|
||||
@@ -31,7 +32,7 @@ export const deleteGuild = async (message: DiscordenoMessage) => {
|
||||
embeds: [
|
||||
{
|
||||
color: successColor,
|
||||
title: "This guild's API setting has been removed from The Artificer's Database.",
|
||||
title: `This guild's API setting has been removed from ${config.name}'s Database.`,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -21,7 +21,7 @@ export const auditDB = async (message: DiscordenoMessage) => {
|
||||
// Get DB statistics
|
||||
const auditQuery = await dbClient.query(`SELECT * FROM db_size;`).catch((e) => utils.commonLoggers.dbError('auditDB.ts:19', 'query', e));
|
||||
|
||||
// Turn all tables into embed fields, currently only properly will handle 25 tables, but we'll fix that when artificer gets 26 tables
|
||||
// Turn all tables into embed fields, currently only properly will handle 25 tables, but we'll fix that when it gets 26 tables
|
||||
const embedFields: Array<EmbedField> = [];
|
||||
auditQuery.forEach((row: DBSizeData) => {
|
||||
embedFields.push({
|
||||
|
||||
@@ -17,7 +17,7 @@ export const help = (message: DiscordenoMessage) => {
|
||||
embeds: [
|
||||
{
|
||||
color: infoColor2,
|
||||
title: "The Artificer's Available Commands:",
|
||||
title: `${config.name}'s Available Commands:`,
|
||||
fields: [
|
||||
{
|
||||
name: `\`${config.prefix}?\``,
|
||||
|
||||
@@ -19,9 +19,9 @@ export const info = (message: DiscordenoMessage) => {
|
||||
color: infoColor2,
|
||||
title: `${config.name}, a Discord bot that specializing in rolling dice and calculating math`,
|
||||
description: `${config.name} is developed by Ean AKA Burn_E99.
|
||||
Additional information can be found on my website [here](https://discord.burne99.com/TheArtificer/).
|
||||
Want to check out my source code? Check it out [here](https://github.com/Burn-E99/TheArtificer).
|
||||
Need help with this bot? Join my support server [here](https://discord.gg/peHASXMZYv).`,
|
||||
Additional information can be found on my website [here](${config.links.homePage}).
|
||||
Want to check out my source code? Check it out [here](${config.links.sourceCode}).
|
||||
Need help with this bot? Join my support server [here](${config.links.supportServer}).`,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -20,12 +20,12 @@ export const privacy = (message: DiscordenoMessage) => {
|
||||
title: 'Privacy Policy',
|
||||
fields: [
|
||||
{
|
||||
name: 'The Artificer does not track or collect user information via Discord.',
|
||||
value: `The only user submitted information that is stored is submitted via the \`${config.prefix}report\` command. This information is only stored for a short period of time in a location that only the Developer of The Artificer can see.
|
||||
name: `${config.name} does not track or collect user information via Discord.`,
|
||||
value: `The only user submitted information that is stored is submitted via the \`${config.prefix}report\` command. This information is only stored for a short period of time in a location that only the Developer of ${config.name} can see.
|
||||
|
||||
For more details, please check out the Privacy Policy on the GitHub [here](https://github.com/Burn-E99/TheArtificer/blob/master/PRIVACY.md).
|
||||
For more details, please check out the Privacy Policy on the GitHub [here](${config.links.privacyPolicy}).
|
||||
|
||||
Terms of Service can also be found on GitHub [here](https://github.com/Burn-E99/TheArtificer/blob/master/TERMS.md).
|
||||
Terms of Service can also be found on GitHub [here](${config.links.termsOfService}).
|
||||
|
||||
Want me to ignore you? Simply run \`${config.prefix}opt-out\` and ${config.name} will no longer read your messages or respond to you.`,
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@ export const report = (message: DiscordenoMessage, args: string[]) => {
|
||||
{
|
||||
color: successColor,
|
||||
title: 'Failed command has been reported to my developer.',
|
||||
description: `For more in depth support, and information about planned maintenance, please join the support server [here](https://discord.gg/peHASXMZYv).`,
|
||||
description: `For more in depth support, and information about planned maintenance, please join the support server [here](${config.links.supportServer}).`,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
} from '../../deps.ts';
|
||||
import { infoColor2 } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
import config from '../../config.ts';
|
||||
|
||||
export const rip = (message: DiscordenoMessage) => {
|
||||
// Light telemetry to see how many times a command is being run
|
||||
@@ -16,7 +17,7 @@ export const rip = (message: DiscordenoMessage) => {
|
||||
embeds: [
|
||||
{
|
||||
color: infoColor2,
|
||||
title: 'The Artificer was built in memory of my Grandmother, Babka',
|
||||
title: `${config.name} was built in memory of my Grandmother, Babka`,
|
||||
description: `With much love, Ean
|
||||
|
||||
December 21, 2020`,
|
||||
|
||||
@@ -17,12 +17,12 @@ export const rollHelp = (message: DiscordenoMessage) => {
|
||||
embeds: [
|
||||
{
|
||||
color: infoColor1,
|
||||
title: "The Artificer's Roll Command Details:",
|
||||
title: `${config.name}'s Roll Command Details:`,
|
||||
description: `You can chain as many of these options as you want, as long as the option does not disallow it.
|
||||
|
||||
This command also can fully solve math equations with parenthesis.
|
||||
|
||||
The Artificer supports most of the [Roll20 formatting](https://artificer.eanm.dev/roll20). More details and examples can be found [here](https://artificer.eanm.dev/roll20).
|
||||
${config.name} supports most of the [Roll20 formatting](${config.links.roll20Formatting}). More details and examples can be found [here](${config.links.roll20Formatting}).
|
||||
|
||||
Run \`[[???\` or \`[[rollDecorators\` for details on the roll decorators.`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user