diff --git a/README.md b/README.md index 23f6a97..c0f04bb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ cold hard bot for cold hard chats ## Commands -- $flood [TEXT] [AMOUNT] - Floods the channel with a specific line x amount of times +- $flood [AMOUNT] [TEXT] - Floods the channel with a specific line x amount of times - $ctcpflood [TARGET] [TEXT (one word)] [AMOUNT] - Sends x amount of CTCP requests to a target. - $sneed - Pastes the Sneed's Feed and Seed copypasta. - $rspam [LINES] - Spams x lines of random characters diff --git a/bot.js b/bot.js index a71122d..f337cec 100644 --- a/bot.js +++ b/bot.js @@ -41,7 +41,7 @@ const generateRandomString = (amt) => { async function help(chan) { bot.say(chan, 'Fascinus - https://git.supernets.org/hogwart7/fascinus') - bot.say(chan, "$flood [TEXT] [AMOUNT] - Floods the channel with a specific line x amount of times") + bot.say(chan, "$flood [AMOUNT] [TEXT] - Floods the channel with a specific line x amount of times") bot.say(chan, "$ctcpflood [TARGET] [TEXT (one word)] [AMOUNT] - Sends x amount of CTCP requests to a target.") bot.say(chan, "$sneed - Pastes the Sneed's Feed and Seed copypasta.") bot.say(chan, "$rspam [LINES] - Spams x lines of random characters") @@ -99,7 +99,10 @@ bot.addListener('message', function(nick, to, text, from) { if (args[0] === '$help') { help(to); } else if (args[0] === '$flood') { - flood(args[1], to, args[2]); + args.shift() + let amt = args.shift() + var string = args.join(" ") + flood(string, to, amt); } else if (args[0] === '$sneed') { sneed(to); } else if (args[0] === '$ctcpflood') {