Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

b.ts (483B)


import { Message } from 'discord.js';

export default (homescope: HomeScope) => {
    const { message, args }
        : { message: Message, args: string[] } = homescope;

    const input = (args.length === 0)
        ? "b"
        : args.join(' ').toLowerCase();

    const alphabet = 'pb';

    const letters = [...input].map((chr: any) =>
        isNaN(chr) && alphabet.includes(chr)
            ? `b`.emojify()
            : chr);

    message.channel.send(letters.join(' '));
};