Skip to content

Instantly share code, notes, and snippets.

@brian6932
Last active January 24, 2024 13:46
Show Gist options
  • Save brian6932/b38b1192636072d7d4d3cbe83e015a6e to your computer and use it in GitHub Desktop.
Save brian6932/b38b1192636072d7d4d3cbe83e015a6e to your computer and use it in GitHub Desktop.
const
loveEmotes = [
`catboyKiss`,
`catKISS`,
`Kissaweeb`,
`KittyKiss`,
`BearHug`,
`catboyHuggies`,
`forsenHug`,
`HUGGIES`,
`otterHug`,
`Kissahomie`,
`dankHug`,
`catHug`,
`BillyApprove`,
`FeelsOkayMan`,
`SoCute`,
`Kiss`,
`FeelsStrongMan`,
`AWW`
],
alarmEmotes = [
`WEEWOO`,
`ppAlarm`,
`Alarm`,
`FrogeAlarm`,
`monkaS`,
`monkaOmega`,
`monkaX`,
`monkaW`,
`PANIC`
],
runningEmotes = [
`SCATTER`,
`peepoRun`,
`Applecatrun`,
`donkRun`,
`PANIC`,
`reiRun`
],
leaderEmotes = [
`BASED`,
`VeryBased`,
`TOOBASED`,
`BASEDCIGAR`,
`EZ`,
`donkDrip`,
`ApuDrip`,
`HOLYDRIP`,
`GIGACHAD`,
`UmaruCool`,
`ReallyCool`,
`KappaCool`,
`FrankerCool`
],
winEmotes = [
`peepoSmash`,
`KeqingFight`,
`shamiSmash`,
`sumSmash`,
`SUGOI`,
`LETSGO`,
`PagMan`,
`PAGLADA`,
`PAGGING`,
`PagBounce`,
`PagChomp`,
`PogU`,
`Pog`,
`PogChamp`,
`WakuWaku`,
`sheCrazy`,
`heCrazy`,
`WICKED`,
`MUGA`,
`Wowee`,
`PogBones`,
`peepoPog`,
`peepoPag`,
`Shockisu`,
`SHUTITDOWN`,
`DESKCHAN`,
`coffinPls`,
`IFeelFine`,
`ImOuttaHere`,
`Fuming`,
`CLEAN`,
`cbt`,
`Hehe`,
`RIPBOZO`,
`EZ`,
`WICKED`,
`B)`
],
lossEmotes = [
`NOOOO`,
`Wehhhh`,
`BLUBBERS`,
`PoroSad`,
`peepoSad`,
`SadLain`,
`Sadeg`,
`Sadge`,
`SadgeCry`,
`SadCat`,
`FeelsBadMan`,
`RAGEY`,
`docnotL`,
`ReallyMad`,
`PunOko`,
`SirMad`,
`SirSad`,
`KannaCry`,
`RemCry`,
`catCry`,
`PepeHands`,
`Madge`,
`reeferSad`,
`sadE`,
`NotLikeThis`,
`NLT`,
`FailFish`,
`SAJ`,
`SAJI`,
`BRUHFAINT`,
`emiruTired`,
`emiruFRICK`,
`mizkifSLAP`,
`Whaa`,
`YOUDIED`,
`ICANT`,
`peepoSad`,
`:(`,
`DEAD`
],
selfFightingEmotes = [
`ICANT`,
`BRUH`,
`lol`,
`Pepega`,
`Pepege`,
`FeelsDankMan`,
`FeelsDonkMan`,
`FDM`,
`HeadEmpty`
],
admins = new Set()
.add(4333339)
.add(15619810)
.add(15620690)
.add(15673910)
.add(15894475),
prefixes = new Set()
.add(`@`)
.add(`_`),
idRe = /\b\d+\b/,
adminCheck = () => {
if (!(admins.has(executorID) || permissions.get() > 2))
throw Error(`This subcommand is priv-ed to broadcasters, ambassadors, and admins only`)
},
commands = {
start: () => {
adminCheck()
channelCustomData.set(`fightClosed`, undefined)
return `Fightclub is back open :D time to fight!`
},
stop: () => {
adminCheck()
channelCustomData.set(`fightClosed`, true)
return `Fightclub is now closed ${commands.stop.name} see you next time! :)`
},
leader: async () => {
const leader = channelCustomData.get(`Leader`)
return leader ?
`Current leader is @${leader} with a record of W: ${channelCustomData.get(`LeaderWs`)} L: ${channelCustomData.get(`LeaderLs`)}. ` +
await utils.getEmote(leaderEmotes.sort(() => Math.random() - .5), ``, { caseSensitivity: false })
: `No current leader`
},
reset: () => {
adminCheck();
[`Leader`, `LeaderWs`, `LeaderLs`].forEach(data => channelCustomData.set(data, undefined))
return `Leaderboard reset`
}
},
fight = async () => {
const cmd = commands[args[0]?.toLowerCase()]
if (cmd)
return cmd()
if (channelCustomData.get(`fightClosed`))
return `Fightclub is currently closed :( come back later!`
let target, self
if (args.length) {
args[0] = args[0].slice(prefixes.has(args[0][0]))
target = await command.execute(`id`, args[0])
if (!target.success)
throw Error(`"$id ${args[0]}" ${target.reason ?? target.reply}`)
self = +idRe.exec(target.reply)[0] === executorID
target = args[0]
}
else {
target = await command.execute(`abb`, `chatter`)
if (!target.success)
throw Error(`"$abb chatter" ${target.reason ?? target.reply}`)
target = target.reply
self = executor === target
}
if (self)
return `Stop fighting yourself, idiot. ${await utils.getEmote(selfFightingEmotes.sort(() => Math.random() - .5), ``, { caseSensitivity: false })}`
const randInt = ~~(Math.random() * 100) + 1
switch (randInt) {
case 77:
channelCustomData.set(`fightClosed`, true)
return await utils.getEmote(alarmEmotes.sort(() => Math.random() - .5), ``, { caseSensitivity: false })
+ ` COPS!! `
+ await utils.getEmote(runningEmotes.sort(() => Math.random() - .5), `\u{1f3c3}`, { caseSensitivity: false })
+ ` (You must get an admin, broadcaster, or ambassador to run " $$${aliasStack} start " to be able to play again)`
case 91:
return `@${executor} decided to not fight @${target} `
+ await utils.getEmote(loveEmotes.sort(() => Math.random() - .5), ``, { caseSensitivity: false })
}
let
wins = ~~customData.get(`Ws`),
losses = ~~customData.get(`Ls`)
const prompt = `You ` + await (async () => {
let options
if (randInt < 49) {
customData.set(`Ws`, ++wins)
options = [
`won the fight against @${target}`,
`are the champion, defeating @${target}`,
`successfully threw a punch at @${target}`,
`sent @${target} packing`,
`served @${target} their head on a platter`,
`fought tooth and nail with @${target}`,
`scared away @${target}`,
`wiped the floor with @${target}`,
`whipped out a knife against @${target}`,
`went for the balls of @${target}`,
`beat the living daylights out of @${target}`,
`took the law into your own hands against @${target}`
]
return `${options[Math.random() * options.length | 0]} ${await utils.getEmote(winEmotes.sort(() => Math.random() - .5), ``, { caseSensitivity: false })}`
}
customData.set(`Ls`, ++losses)
options = [
`lost the fight against @${target}`,
`got knocked out by @${target}`,
`fought a losing battle against @${target}`,
`swung at @${target} and missed`,
`took a knife to a gunfight with @${target}`,
`threw a punch at @${target} but nothing happened`,
`will do better next time against @${target}`,
`decided to run away from @${target}`,
`fought tooth and nail with @${target} but lost`,
`didn't stand a chance against @${target}`
]
return `${options[Math.random() * options.length | 0]} ${await utils.getEmote(lossEmotes.sort(() => Math.random() - .5), ``, { caseSensitivity: false })}`
})() + ` \u{2022} W: ${wins} L: ${losses}.`
const leader = channelCustomData.get(`Leader`)
if ((wins - losses) > (~~channelCustomData.get(`LeaderWs`) - ~~channelCustomData.get(`LeaderLs`)) || executor === leader) {
if (executor !== leader)
channelCustomData.set(`Leader`, executor)
channelCustomData.set(`LeaderWs`, wins)
channelCustomData.set(`LeaderLs`, losses)
}
return prompt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment