diff --git a/sfx/README.md b/sfx/README.md new file mode 100644 index 0000000..9f0040f --- /dev/null +++ b/sfx/README.md @@ -0,0 +1,59 @@ +**GENERAL** +2+2, ahhh, alert, aspen, auw, aww, bonk, bustin, chafe, chipotle, chomp, choochoo, correct, date, dong, duck, enjoy, ez, fakehands, fbrage, fine, flippers, funnyhow, gatekeepah, gcn, groovy, gyst, help, herewego, heyheyhey, heymf, highscore, hop, how, hype, idgaf, imawot, interesting, jacked, knob, lab, laugh, lisa, long, mad, massage, mayo, meme, mmmm, mouthfeel, mybody, neat, nevergiveup, obaeb, ohno, okusa, onejoint, onfire, ow, poopy, popup, porkchop, pour, ppump, qty, raffle, rawr, rentfree, respect, robotears, rpgfarm, sdgtw, sendit, sofast, sogood, stick, store, suh, swag, tasty, tea, thatthing, theline, tmm, tojesus, tootski, trash, triple, urf, wahwah, wanker, waow, wdied, wow, yahoo, yippee, yoshi, youguys + +**NERDS** +anders, blazeit, booty, butt, bwaa, disagree, doomtaonline, duckscream, emmapos, fdup, fk, fuckduck,hellway, jebaited, lol, mcgasm, milk, myman, nfc, oh, pprage, ppscream, rando, rip, run, runsover, sgqf, smd, speednoises, stfu, tbhamfact, teats, whathaveidone + +**HAM** +archery, hamhelp, hamlaugh, hamlaugh2, hamscream, pyle, spam, speedrunner, stank, wait, why + +**JOSH** +blblbl, goofy, joshbitch, joshgoat, joshlaugh, joshlaugh2, joshlaugh3, joshlaugh4, joshscream, joshwhinny, joshx + +**LANX** +dominos, lanx, lanx2 + +**MUTT** +muttfart, muttfart2, muttlaugh, muttscream, muttwalksin, wobbuffet + +**EMMA** +airplane, bye, byeb, emetarage, emetarage2, emetarage3, fu, split + +**DEEBS** +1v2, bossmusic, dbio, deebsfart, deebslaugh, english, fencedash, lanmo, timmon, trinexx, vitty + +**STEPHEN** +craft, diaper, f, mothhole + +**FRICKER** +anteater, eggs, fuzzy, h2o, ncd, shj + +**XELNA** +wiki, xelboss, xelkiss + +**TWIN PEAKS** +albert, andhot, coffee, dead, drinkfull, fish, gordon, gordon2, gordon3, gordon4, gotalight, gum, letsrock, mapleham, mrjackpots, myarms, newshoes, present, veranda, vision + +**ATHF** +arise, bananas, bjqueen, carlcandy, dontmatter, gross, hahaa, hightonight, idc, kudos, lang, party, rockin, threat, tonight, watchyourback + +**IT CROWD** +20gp, door, esp, hammertime, oldman, seaparks, seeitnow + +**SIMPSONS** +learnding, mash, nerd, rake, stahp, toofat, towel + +**JURASSIC PARK** +bigshit, clever, digup, dinodna, dodson, hatethatman, hrwah, hunt, please, pushpush, trex, tour + +**THE GOOD PLACE** +banana, human, puzzles, shirtballs, unhelpful + +**SILICON VALLEY** +algore, crush, cumin, dd, goldcaps + +**KING OF THE HILL** +bill + +**MISC** +cd, cooler, slowmo-in, slowmo-out diff --git a/sfx/bweh.mp3 b/sfx/bweh.mp3 deleted file mode 100644 index 0a00870..0000000 Binary files a/sfx/bweh.mp3 and /dev/null differ diff --git a/sfx/chrislaugh.mp3 b/sfx/chrislaugh.mp3 deleted file mode 100755 index 989fdc1..0000000 Binary files a/sfx/chrislaugh.mp3 and /dev/null differ diff --git a/sfx/lookatme.mp3 b/sfx/lookatme.mp3 deleted file mode 100755 index f0a5c29..0000000 Binary files a/sfx/lookatme.mp3 and /dev/null differ diff --git a/sfx/wtf.mp3 b/sfx/wtf.mp3 deleted file mode 100755 index 097b0b6..0000000 Binary files a/sfx/wtf.mp3 and /dev/null differ diff --git a/src/commands/prefix/sfx.js b/src/commands/prefix/sfx.js index e41dc60..bdf22b0 100644 --- a/src/commands/prefix/sfx.js +++ b/src/commands/prefix/sfx.js @@ -28,20 +28,32 @@ module.exports = { // If no SFX specified, show the list if (!sfxName) { try { - const response = await axios.get('https://rentry.co/ghbotsfx/raw'); + const fs = require('fs'); + const path = require('path'); + const sfxReadmePath = path.join(__dirname, '..', '..', '..', 'sfx', 'README.md'); - // Break into chunks if message is too long - let chunks = [response.data]; - if (response.data.length > 2000) { - chunks = chunkSubstr(response.data, Math.ceil(response.data.length / 2)); - } - - for (const chunk of chunks) { - await message.channel.send(chunk); + if (fs.existsSync(sfxReadmePath)) { + const sfxListContent = fs.readFileSync(sfxReadmePath, 'utf-8'); + + // Break into chunks if too long (Discord limit is 2000 characters) + if (sfxListContent.length <= 2000) { + await message.channel.send(sfxListContent); + } else { + const chunks = chunkSubstr(sfxListContent, 1900); // Leave some buffer + + for (const chunk of chunks) { + await message.channel.send(chunk); + } + } + } else { + // Fallback to generated list if README doesn't exist + const sfxNames = sfxManager.getSFXNames(); + const sfxList = `**Available Sound Effects (${sfxNames.length}):**\n\`\`\`\n${sfxNames.join(', ')}\n\`\`\``; + await message.channel.send(sfxList); } } catch (error) { - console.error('Error fetching SFX list:', error); - await message.reply('Could not fetch the SFX list.'); + console.error('Error reading SFX list:', error); + await message.reply('Could not load the SFX list.'); } return; }