remove devmode flag
This commit is contained in:
parent
46757b31bc
commit
65fc9e56de
|
@ -2,7 +2,6 @@ import { DiscordenoMessage } from '@discordeno';
|
||||||
import { log, LogTypes as LT } from '@Log4Deno';
|
import { log, LogTypes as LT } from '@Log4Deno';
|
||||||
|
|
||||||
import config from '~config';
|
import config from '~config';
|
||||||
import { DEVMODE } from '~flags';
|
|
||||||
|
|
||||||
import { getModifiers } from 'artigen/dice/getModifiers.ts';
|
import { getModifiers } from 'artigen/dice/getModifiers.ts';
|
||||||
|
|
||||||
|
@ -13,8 +12,6 @@ import { generateRollError, rollingEmbed } from 'artigen/utils/embeds.ts';
|
||||||
import dbClient from 'db/client.ts';
|
import dbClient from 'db/client.ts';
|
||||||
import { queries } from 'db/common.ts';
|
import { queries } from 'db/common.ts';
|
||||||
|
|
||||||
import { warnColor } from 'embeds/colors.ts';
|
|
||||||
|
|
||||||
import utils from 'utils/utils.ts';
|
import utils from 'utils/utils.ts';
|
||||||
|
|
||||||
export const roll = async (message: DiscordenoMessage, args: string[], command: string) => {
|
export const roll = async (message: DiscordenoMessage, args: string[], command: string) => {
|
||||||
|
@ -23,21 +20,6 @@ export const roll = async (message: DiscordenoMessage, args: string[], command:
|
||||||
dbClient.execute(queries.callIncCnt('roll')).catch((e) => utils.commonLoggers.dbError('roll.ts:20', 'call sproc INC_CNT on', e));
|
dbClient.execute(queries.callIncCnt('roll')).catch((e) => utils.commonLoggers.dbError('roll.ts:20', 'call sproc INC_CNT on', e));
|
||||||
dbClient.execute(queries.callIncHeatmap(currDateTime)).catch((e) => utils.commonLoggers.dbError('roll.ts:21', 'update', e));
|
dbClient.execute(queries.callIncHeatmap(currDateTime)).catch((e) => utils.commonLoggers.dbError('roll.ts:21', 'update', e));
|
||||||
|
|
||||||
// If DEVMODE is on, only allow this command to be used in the devServer
|
|
||||||
if (DEVMODE && message.guildId !== config.devServer) {
|
|
||||||
message
|
|
||||||
.send({
|
|
||||||
embeds: [
|
|
||||||
{
|
|
||||||
color: warnColor,
|
|
||||||
title: 'Command is in development, please try again later.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
.catch((e: Error) => utils.commonLoggers.messageSendError('roll.ts:30', message, e));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rest of this command is in a try-catch to protect all sends/edits from erroring out
|
// Rest of this command is in a try-catch to protect all sends/edits from erroring out
|
||||||
try {
|
try {
|
||||||
let originalCommand = `${command}${command.length === 0 ? args.join('').trim() : args.join('')}`;
|
let originalCommand = `${command}${command.length === 0 ? args.join('').trim() : args.join('')}`;
|
||||||
|
|
Loading…
Reference in New Issue