From 2af174ba1f9dcb12a3fefc7552810d061c4a153d Mon Sep 17 00:00:00 2001 From: Dragory Date: Sat, 15 Dec 2018 17:21:51 +0200 Subject: [PATCH] cleanup: use utils.noop instead of empty fn --- src/plugins/Utility.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/Utility.ts b/src/plugins/Utility.ts index b934986e..b0bfcd8e 100644 --- a/src/plugins/Utility.ts +++ b/src/plugins/Utility.ts @@ -1,6 +1,6 @@ import { Plugin, decorators as d, reply } from "knub"; import { Channel, EmbedOptions, Message, TextChannel, User, VoiceChannel } from "eris"; -import { embedPadding, errorMessage, stripObjectToScalars, successMessage, trimLines } from "../utils"; +import { embedPadding, errorMessage, noop, stripObjectToScalars, successMessage, trimLines } from "../utils"; import { GuildLogs } from "../data/GuildLogs"; import { LogType } from "../data/LogType"; import moment from "moment-timezone"; @@ -173,8 +173,8 @@ export class UtilityPlugin extends Plugin { ); setTimeout(() => { - msg.delete().catch(() => {}); - responseMsg.delete().catch(() => {}); + msg.delete().catch(noop); + responseMsg.delete().catch(noop); }, CLEAN_COMMAND_DELETE_DELAY); } @@ -196,8 +196,8 @@ export class UtilityPlugin extends Plugin { ); setTimeout(() => { - msg.delete().catch(() => {}); - responseMsg.delete().catch(() => {}); + msg.delete().catch(noop); + responseMsg.delete().catch(noop); }, CLEAN_COMMAND_DELETE_DELAY); } @@ -219,8 +219,8 @@ export class UtilityPlugin extends Plugin { ); setTimeout(() => { - msg.delete().catch(() => {}); - responseMsg.delete().catch(() => {}); + msg.delete().catch(noop); + responseMsg.delete().catch(noop); }, CLEAN_COMMAND_DELETE_DELAY); }