diff --git a/src/handler/utilities/messageHelpers.ts b/src/handler/utilities/messageHelpers.ts index eb2f438..9d527f4 100644 --- a/src/handler/utilities/messageHelpers.ts +++ b/src/handler/utilities/messageHelpers.ts @@ -1,28 +1,5 @@ import type { Message } from 'discord.js'; -/** - * Checks if the author of message is a bot or not - * @param message The message to check - * @returns `true` if the author of the message is a bot, `false` otherwise - * @example - * isBot(message) ? 'yes it is a bot' : 'no it is not a bot'; - */ -export function isNotFromBot(message: Message) { - return !message.author.bot; -} - -/** - * Checks if the message **starts** with the prefix - * @param message The message to check - * @param prefix The prefix to check for - * @returns `true` if the message starts with the prefix, `false` otherwise - * @example - * hasPrefix(message, '!') ? 'yes it does' : 'no it does not'; - */ -export function hasPrefix(message: Message, prefix?: string) { - return message.content.startsWith(prefix!); -} - /** * Removes the first character(s) _[depending on prefix length]_ of the message * @param msg diff --git a/tests/functions.test.ts b/tests/functions.test.ts deleted file mode 100644 index cb57fe2..0000000 --- a/tests/functions.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { fmt, hasPrefix, isNotFromBot } from '../src/handler/utilities/messageHelpers'; - -describe('FUNCTIONS', () => { - test('If hasPrefix is a function', () => { - expect(typeof hasPrefix).toBe('function'); - }); - test('if fmt is a function', () => { - expect(typeof fmt).toBe('function'); - }); - test('if isBot is a function', () => { - expect(typeof isNotFromBot).toBe('function'); - }); -});