1
0
mirror of https://github.com/Burn-E99/SweeperBot.git synced 2026-06-04 07:53:50 -04:00

sonar cleanup

This commit is contained in:
Ean Milligan (Bastion)
2022-09-03 04:58:54 -04:00
parent 85cb556763
commit 6918cc70a4
9 changed files with 1 additions and 25 deletions

View File

@@ -14,9 +14,6 @@ import utils from '../utils.ts';
export const handleMentions = (bot: Bot, message: Message) => {
log(LT.LOG, `Handling @mention message: ${utils.jsonStringifyBig(message)}`);
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('mention')).catch((e) => utils.commonLoggers.dbError('handleMentions.ts:17', 'call sproc INC_CNT on', e));
bot.helpers.sendMessage(message.channelId, {
embeds: [{
color: infoColor1,

View File

@@ -9,9 +9,6 @@ import { infoColor2 } from '../commandUtils.ts';
import utils from '../utils.ts';
export const help = (bot: Bot, message: Message) => {
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('help')).catch((e) => utils.commonLoggers.dbError('htlp.ts:15', 'call sproc INC_CNT on', e));
bot.helpers.sendMessage(message.channelId, {
embeds: [{
color: infoColor2,

View File

@@ -9,9 +9,6 @@ import { infoColor2 } from '../commandUtils.ts';
import utils from '../utils.ts';
export const info = (bot: Bot, message: Message) => {
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('info')).catch((e) => utils.commonLoggers.dbError('info.ts:12', 'call sproc INC_CNT on', e));
bot.helpers.sendMessage(message.channelId, {
embeds: [{
color: infoColor2,

View File

@@ -8,9 +8,6 @@ import { generatePing } from '../commandUtils.ts';
import utils from '../utils.ts';
export const ping = async (bot: Bot, message: Message) => {
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('ping')).catch((e) => utils.commonLoggers.dbError('ping.ts:14', 'call sproc INC_CNT on', e));
// Calculates ping between sending a message and editing it, giving a nice round-trip latency.
try {
const m = await bot.helpers.sendMessage(message.channelId, generatePing(-1));

View File

@@ -11,9 +11,6 @@ import { failColor, generateReport, successColor } from '../commandUtils.ts';
import utils from '../utils.ts';
export const report = (bot: Bot, message: Message, args: string[]) => {
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('report')).catch((e) => utils.commonLoggers.dbError('report.ts:17', 'call sproc INC_CNT on', e));
if (args.join(' ')) {
sendMessage(bot, config.reportChannel, generateReport(args.join(' '))).catch((e: Error) => utils.commonLoggers.messageSendError('report.ts:22', message, e));
bot.helpers.sendMessage(message.channelId, {

View File

@@ -10,9 +10,6 @@ import { failColor, successColor } from '../commandUtils.ts';
import utils from '../utils.ts';
export const sendMsg = (bot: Bot, message: Message, args: string[]) => {
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('report')).catch((e) => utils.commonLoggers.dbError('report.ts:17', 'call sproc INC_CNT on', e));
try {
const channelId = BigInt(args.shift() || '0');

View File

@@ -9,9 +9,6 @@ import { infoColor1 } from '../commandUtils.ts';
import utils from '../utils.ts';
export const version = (bot: Bot, message: Message) => {
// Light telemetry to see how many times a command is being run
// dbClient.execute(queries.callIncCnt('version')).catch((e) => utils.commonLoggers.dbError('version.ts:15', 'call sproc INC_CNT on', e));
bot.helpers.sendMessage(message.channelId, {
embeds: [{
color: infoColor1,

View File

@@ -16,8 +16,5 @@ export const messageUpdate = (bot: Bot, message: Message) => {
if (config.pollChannels.includes(message.channelId)) {
functions.pollReactions(bot, message, true);
}
// return as we are done handling this command
return;
}
};