mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-06-04 09:03:50 -04:00
add docs and delete option to inline command
This commit is contained in:
@@ -85,6 +85,11 @@ export const help = (message: DiscordenoMessage) => {
|
||||
value: 'Removes you from the ignore list',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}inline [subcommand]\``,
|
||||
value: `Controls whether or not inline rolls can be done in a guild, run \`${config.prefix}inline help\` for more details`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}xdydzracsq!${config.postfix}\` ...`,
|
||||
value:
|
||||
|
||||
@@ -5,7 +5,7 @@ import config from '~config';
|
||||
import dbClient from 'db/client.ts';
|
||||
import { inlineList, queries } from 'db/common.ts';
|
||||
|
||||
import { failColor, infoColor1, successColor } from 'embeds/colors.ts';
|
||||
import { failColor, infoColor1, infoColor2, successColor } from 'embeds/colors.ts';
|
||||
|
||||
import utils from 'utils/utils.ts';
|
||||
|
||||
@@ -66,6 +66,7 @@ export const toggleInline = async (message: DiscordenoMessage, args: string[]) =
|
||||
break;
|
||||
case 'block':
|
||||
case 'disable':
|
||||
case 'delete':
|
||||
await dbClient.execute('DELETE FROM allow_inline WHERE guildid = ?', [message.guildId]).catch((e) => {
|
||||
utils.commonLoggers.dbError('toggleInline.ts:65', 'delete from allow_inline', e);
|
||||
errorOut = true;
|
||||
@@ -75,7 +76,6 @@ export const toggleInline = async (message: DiscordenoMessage, args: string[]) =
|
||||
}
|
||||
break;
|
||||
case 'status':
|
||||
default:
|
||||
message.send({
|
||||
embeds: [
|
||||
{
|
||||
@@ -86,6 +86,50 @@ export const toggleInline = async (message: DiscordenoMessage, args: string[]) =
|
||||
],
|
||||
});
|
||||
return;
|
||||
case 'h':
|
||||
case 'help':
|
||||
default:
|
||||
message
|
||||
.send({
|
||||
embeds: [
|
||||
{
|
||||
color: infoColor2,
|
||||
title: `${config.name}'s Inline Roll Details:`,
|
||||
description:
|
||||
`${config.name} has an option to allow inline rolls in your guild. An inline roll is a roll that does not immediately start with \`${config.prefix}\`, such as \`test ${config.prefix}d20${config.postfix}\`.
|
||||
|
||||
By default, inline rolls are blocked from being sent in your guild. These commands may only be used by the Owner or Admins of your guild.`,
|
||||
},
|
||||
{
|
||||
color: infoColor1,
|
||||
title: 'Available Inline Commands:',
|
||||
fields: [
|
||||
{
|
||||
name: `\`${config.prefix}inline help\``,
|
||||
value: 'This command',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}inline status\``,
|
||||
value: 'Shows the current status of inline rolls for this guild',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}inline allow/enable\``,
|
||||
value: 'Allows inline rolls in the guild',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}inline block/disable/delete\``,
|
||||
value: 'Blocks inline rolls in the guild',
|
||||
inline: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
.catch((e: Error) => utils.commonLoggers.messageSendError('apiHelp.ts:67', message, e));
|
||||
return;
|
||||
}
|
||||
if (errorOut) {
|
||||
message.send({
|
||||
|
||||
Reference in New Issue
Block a user