deno fmt
This commit is contained in:
parent
d769ac0e5a
commit
a8bcdb346b
|
@ -3,9 +3,6 @@ import {
|
|||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
hasGuildPermissions,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import apiCommands from './apiCmd/_index.ts';
|
||||
import { failColor } from '../commandUtils.ts';
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import { generateApiFailed, generateApiSuccess } from '../../commandUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
@ -12,7 +9,7 @@ import utils from '../../utils.ts';
|
|||
export const allowBlock = async (message: DiscordenoMessage, apiArg: string) => {
|
||||
let errorOutInitial = false;
|
||||
const guildQuery = await dbClient.query(`SELECT guildid, channelid FROM allowed_guilds WHERE guildid = ? AND channelid = ?`, [message.guildId, message.channelId]).catch((e0) => {
|
||||
utils.commonLoggers.dbError('allowBlock.ts:15', 'query', e0)
|
||||
utils.commonLoggers.dbError('allowBlock.ts:15', 'query', e0);
|
||||
message.send(generateApiFailed(apiArg)).catch((e: Error) => utils.commonLoggers.messageSendError('allowBlock.ts:16', message, e));
|
||||
errorOutInitial = true;
|
||||
});
|
||||
|
@ -23,7 +20,7 @@ export const allowBlock = async (message: DiscordenoMessage, apiArg: string) =>
|
|||
// Since guild is not in our DB, add it in
|
||||
await dbClient.execute(`INSERT INTO allowed_guilds(guildid,channelid,active) values(?,?,?)`, [message.guildId, message.channelId, (apiArg === 'allow' || apiArg === 'enable') ? 1 : 0]).catch(
|
||||
(e0) => {
|
||||
utils.commonLoggers.dbError('allowBlock:26', 'insert into', e0)
|
||||
utils.commonLoggers.dbError('allowBlock:26', 'insert into', e0);
|
||||
message.send(generateApiFailed(apiArg)).catch((e: Error) => utils.commonLoggers.messageSendError('allowBlock.ts:27', message, e));
|
||||
errorOut = true;
|
||||
},
|
||||
|
@ -32,7 +29,7 @@ export const allowBlock = async (message: DiscordenoMessage, apiArg: string) =>
|
|||
// Since guild is in our DB, update it
|
||||
await dbClient.execute(`UPDATE allowed_guilds SET active = ? WHERE guildid = ? AND channelid = ?`, [(apiArg === 'allow' || apiArg === 'enable') ? 1 : 0, message.guildId, message.channelId]).catch(
|
||||
(e0) => {
|
||||
utils.commonLoggers.dbError('allowBlock.ts:35', 'update', e0)
|
||||
utils.commonLoggers.dbError('allowBlock.ts:35', 'update', e0);
|
||||
message.send(generateApiFailed(apiArg)).catch((e: Error) => utils.commonLoggers.messageSendError('allowBlock.ts:36', message, e));
|
||||
errorOut = true;
|
||||
},
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import { failColor, successColor } from '../../commandUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
@ -12,7 +9,7 @@ import utils from '../../utils.ts';
|
|||
export const deleteGuild = async (message: DiscordenoMessage) => {
|
||||
let errorOut = false;
|
||||
await dbClient.execute(`DELETE FROM allowed_guilds WHERE guildid = ? AND channelid = ?`, [message.guildId, message.channelId]).catch((e0) => {
|
||||
utils.commonLoggers.dbError('deleteGuild.ts:15', 'query', e0)
|
||||
utils.commonLoggers.dbError('deleteGuild.ts:15', 'query', e0);
|
||||
message.send({
|
||||
embeds: [{
|
||||
color: failColor,
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import { generateApiFailed, generateApiSuccess } from '../../commandUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import { failColor, generateApiStatus } from '../../commandUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import auditCommands from './auditCmd/_index.ts';
|
||||
import { failColor } from '../commandUtils.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import {
|
|||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
EmbedField,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import { infoColor2 } from '../../commandUtils.ts';
|
||||
import { compilingStats } from '../../commonEmbeds.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { infoColor2 } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { infoColor2 } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { generatePing } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { infoColor1 } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
// Discordeno deps
|
||||
sendMessage,
|
||||
} from '../../deps.ts';
|
||||
|
|
|
@ -2,9 +2,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { infoColor2 } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { infoColor1, infoColor2, successColor } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -4,9 +4,6 @@ import {
|
|||
cache,
|
||||
cacheHandlers,
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { generateStats } from '../commandUtils.ts';
|
||||
import { compilingStats } from '../commonEmbeds.ts';
|
||||
|
|
|
@ -3,9 +3,6 @@ import { dbClient } from '../db.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
DiscordenoMessage,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../deps.ts';
|
||||
import { infoColor1 } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import config from '../../../config.ts';
|
||||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
// nanoid deps
|
||||
nanoid,
|
||||
// Discordeno deps
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import stdResp from '../stdResponses.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import config from '../../../config.ts';
|
||||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
// nanoid deps
|
||||
nanoid,
|
||||
// Discordeno deps
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import config from '../../../config.ts';
|
||||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
// nanoid deps
|
||||
nanoid,
|
||||
} from '../../../deps.ts';
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import stdResp from '../stdResponses.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import stdResp from '../stdResponses.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import config from '../../../config.ts';
|
||||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import stdResp from '../stdResponses.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import config from '../../../config.ts';
|
||||
import { dbClient } from '../../db.ts';
|
||||
import {
|
||||
// Log4Deno deps
|
||||
log,
|
||||
LT,
|
||||
} from '../../../deps.ts';
|
||||
import stdResp from '../stdResponses.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
|
|
|
@ -77,7 +77,9 @@ const handleRollWorker = async (rq: QueuedRoll) => {
|
|||
|
||||
if (rq.apiRoll || DEVMODE && config.logRolls) {
|
||||
// If enabled, log rolls so we can see what went wrong
|
||||
dbClient.execute(queries.insertRollLogCmd(rq.apiRoll ? 1 : 0, 1), [rq.originalCommand, returnmsg.errorCode, rq.apiRoll ? null : rq.dd.m.id]).catch((e) => utils.commonLoggers.dbError('rollQueue.ts:82', 'insert into', e));
|
||||
dbClient.execute(queries.insertRollLogCmd(rq.apiRoll ? 1 : 0, 1), [rq.originalCommand, returnmsg.errorCode, rq.apiRoll ? null : rq.dd.m.id]).catch((e) =>
|
||||
utils.commonLoggers.dbError('rollQueue.ts:82', 'insert into', e)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
let n: DiscordenoMessage | void;
|
||||
|
|
Loading…
Reference in New Issue