- Added hunt/feed duck mechanics (80% hunt, 20% feed) - Implemented persistent scoring system - Added channel control commands (\!stopducks/\!startducks) - Enhanced duck hunt with wrong action penalties - Organized bot structure with botmain.js as main file - Added comprehensive documentation (README.md) - Included 17 plugins with various games and utilities 🦆 Duck Hunt Features: - Hunt ducks with \!shoot/\!bang (80% of spawns) - Feed ducks with \!feed (20% of spawns) - Persistent scores saved to JSON - Channel-specific controls for #bakedbeans - Reaction time tracking and special achievements 🎮 Other Games: - Casino games (slots, coinflip, hi-lo, scratch cards) - Multiplayer games (pigs, zombie dice, quiplash) - Text generation (babble, conspiracy, drunk historian) - Interactive features (story writing, emojify, combos) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
156 lines
No EOL
12 KiB
JavaScript
156 lines
No EOL
12 KiB
JavaScript
// plugins/drunk-historian.js - Drunk Historian Bot Plugin
|
|
module.exports = {
|
|
drunkLevel: 0, // Gets progressively more drunk with each story
|
|
|
|
init(bot) {
|
|
console.log('Drunk Historian plugin initialized - *hic*');
|
|
this.drunkLevel = 0;
|
|
},
|
|
|
|
cleanup(bot) {
|
|
console.log('Drunk Historian plugin cleaned up - time to sober up!');
|
|
},
|
|
|
|
commands: [
|
|
{
|
|
name: 'history',
|
|
description: 'Tells a historical "fact" (gets progressively more drunk)',
|
|
execute(context, bot) {
|
|
const story = module.exports.tellHistory();
|
|
bot.say(context.replyTo, story);
|
|
module.exports.drunkLevel++;
|
|
}
|
|
},
|
|
|
|
{
|
|
name: 'ancienthistory',
|
|
description: 'Tells ancient history while very drunk',
|
|
execute(context, bot) {
|
|
module.exports.drunkLevel = Math.max(5, module.exports.drunkLevel);
|
|
const story = module.exports.tellAncientHistory();
|
|
bot.say(context.replyTo, story);
|
|
module.exports.drunkLevel++;
|
|
}
|
|
},
|
|
|
|
{
|
|
name: 'soberup',
|
|
description: 'Historian tries to sober up',
|
|
execute(context, bot) {
|
|
const oldLevel = module.exports.drunkLevel;
|
|
module.exports.drunkLevel = Math.max(0, module.exports.drunkLevel - 3);
|
|
if (oldLevel > 0) {
|
|
bot.say(context.replyTo, '🍺➡️☕ *drinks coffee* Okay, okay... let me try to get my facts straight here... *squints at history books*');
|
|
} else {
|
|
bot.say(context.replyTo, '📚 I\'m completely sober! Ready to tell you some REAL history! ...for now.');
|
|
}
|
|
}
|
|
},
|
|
|
|
{
|
|
name: 'drunkness',
|
|
description: 'Check how drunk the historian is',
|
|
execute(context, bot) {
|
|
const level = module.exports.drunkLevel;
|
|
let status = '';
|
|
if (level === 0) status = '📚 Completely sober and scholarly';
|
|
else if (level <= 2) status = '🍻 Slightly tipsy, facts mostly accurate';
|
|
else if (level <= 4) status = '🍺 Getting wobbly, mixing up dates';
|
|
else if (level <= 6) status = '🥴 Pretty drunk, inventing new historical figures';
|
|
else if (level <= 8) status = '🍷 Very drunk, history is more like fantasy now';
|
|
else status = '🤪 Completely wasted, pure nonsense incoming';
|
|
|
|
bot.say(context.replyTo, `🎭 Historian\'s current state: ${status} (Level ${level})`);
|
|
}
|
|
}
|
|
],
|
|
|
|
tellHistory() {
|
|
const level = this.drunkLevel;
|
|
|
|
if (level === 0) {
|
|
return this.getSoberHistory();
|
|
} else if (level <= 2) {
|
|
return this.getSlightlyDrunkHistory();
|
|
} else if (level <= 4) {
|
|
return this.getModeratelyDrunkHistory();
|
|
} else if (level <= 6) {
|
|
return this.getVeryDrunkHistory();
|
|
} else {
|
|
return this.getCompletelyWastedHistory();
|
|
}
|
|
},
|
|
|
|
getSoberHistory() {
|
|
const facts = [
|
|
'📚 In 1969, Neil Armstrong became the first human to walk on the moon, famously saying "That\'s one small step for man, one giant leap for mankind."',
|
|
'📚 The Great Wall of China was built over many centuries, primarily during the Ming Dynasty (1368-1644), to protect against northern invasions.',
|
|
'📚 The Renaissance began in Italy during the 14th century and marked a cultural rebirth in art, science, and literature.',
|
|
'📚 World War II ended in 1945 after the atomic bombings of Hiroshima and Nagasaki led to Japan\'s surrender.',
|
|
'📚 The Roman Empire fell in 476 AD when the Germanic chieftain Odoacer deposed the last Western Roman Emperor.'
|
|
];
|
|
return this.randomChoice(facts);
|
|
},
|
|
|
|
getSlightlyDrunkHistory() {
|
|
const facts = [
|
|
'🍻 So like, Napoleon was this short French guy... wait, actually he wasn\'t that short, that\'s a myth! *hic* Anyway, he conquered most of Europe and then... uh... Russia happened. Bad idea, Nappy!',
|
|
'🍻 The Titanic sank in 1912 because... well, icebergs are basically the ocean\'s way of saying "surprise!" *hic* They said it was unsinkable. Spoiler alert: it sank.',
|
|
'🍻 Vikings! *hic* They had horned helmets... no wait, that\'s totally made up. They were actually pretty clean people who traded a lot. But the raiding thing was real. Very real.',
|
|
'🍻 Ancient Egypt... pyramids... aliens? No, wait, that\'s not history, that\'s conspiracy theories. *hic* They just had really good engineers and lots of slaves. Sad but true.',
|
|
'🍻 Christopher Columbus "discovered" America in 1492, except... *hic* ...there were already people there! Awkward! Also he thought he was in India. GPS would have helped, Chris.'
|
|
];
|
|
return this.randomChoice(facts);
|
|
},
|
|
|
|
getModeratelyDrunkHistory() {
|
|
const facts = [
|
|
'🍺 *swaying* OK so... Joan of Arc... she was this French teenager who heard voices... and somehow convinced the king to let her lead an army?? *hic* Like, imagine explaining that to your parents! "Mom, God told me to go fight the English!" Wild times, man.',
|
|
'🍺 The Black Death killed like... *counts on fingers* ...a LOT of people in medieval Europe. Like 30-60% of the population! *hic* But hey, afterwards wages went up because there weren\'t enough workers! Economic supply and demand, baby!',
|
|
'🍺 Benjamin Franklin... *hic* ...this guy was like the ultimate life hacker! Scientist, inventor, diplomat, AND he convinced French people to help America fight Britain! Plus he flew a kite in a storm like a absolute madman! ⚡',
|
|
'🍺 *hiccup* The Great Fire of London in 1666... started in a BAKERY! *laughing* Imagine being that baker! "Honey, I may have accidentally burned down the entire city..." But hey, they rebuilt it better!',
|
|
'🍺 Cleopatra... last pharaoh of Egypt... *hic* ...she was actually Greek, not Egyptian! Plot twist! Also she spoke like 9 languages and was probably smarter than most people today. Respect! 👑'
|
|
];
|
|
return this.randomChoice(facts);
|
|
},
|
|
|
|
getVeryDrunkHistory() {
|
|
const facts = [
|
|
'🥴 *stumbling* Lemme tell you about... about Julius Caesar! This guy... *hic* ...he crossed some river with his army and said something about dice! Then he conquered Gaul, which I think is France but with more... more... what\'s the word... GAULS! Then his best friend stabbed him! Et tu, Brute! BETRAYAL! *dramatically gestures*',
|
|
'🥴 The... the Boston Tea Party! *hic* So these Americans were mad about taxes... so they dressed up as NATIVE AMERICANS and threw perfectly good tea into the harbor! Do you know how much tea costs?! The British were SO MAD! *giggles* It\'s like the world\'s most expensive prank!',
|
|
'🥴 *nearly falling over* Alexander the Great! This kid... he was like... 20-something and conquered THE ENTIRE KNOWN WORLD! *hic* But then he died at 32, probably from partying too hard! Or poison. Or both! Kids these days... no, wait, that was 2000 years ago...',
|
|
'🥴 The Dancing Plague of 1518! *twirling around* People in France just started dancing... and couldn\'t stop! For DAYS! Some even danced themselves to death! *hic* It\'s like the world\'s deadliest dance party! What was in the medieval water supply?!',
|
|
'🥴 *slurring* Henry the Eighth... this guy had SIX WIVES! Six! And he kept... *makes chopping motion* ...off with their heads! Divorce wasn\'t enough for this maniac! Anne Boleyn probably should\'ve swiped left... if Tinder existed in 1536...'
|
|
];
|
|
return this.randomChoice(facts);
|
|
},
|
|
|
|
getCompletelyWastedHistory() {
|
|
const facts = [
|
|
'🤪 *completely incoherent* Listen... LISTEN... George Washington... he had WOODEN TEETH! But get this... *hic* ...they weren\'t wood! They were HIPPO IVORY! And human teeth! FROM OTHER PEOPLE! *screaming* THE FIRST PRESIDENT WAS A TOOTH VAMPIRE! Also he grew marijuana! No wait, that was hemp... same plant... different vibes... *collapses*',
|
|
'🤪 *babbling* The Library of Alexandria burned down and we lost ALL THE KNOWLEDGE! *sobbing* Do you know what was in there?! The cure for hangovers! The secret to immortality! Cat memes from ancient Egypt! EVERYTHING! *hic* It was like if the internet got deleted but WITH FIRE!',
|
|
'🤪 *flailing arms* SPARTACUS! This gladiator slave said "NAH FAM" to the Roman Empire and started a rebellion with KITCHEN UTENSILS! *hic* Imagine explaining to Caesar that you got defeated by a guy with a SPOON! "Sir, the slaves are revolting!" "I know, they smell terrible!" "No sir, I mean they\'re ACTUALLY revolting!"',
|
|
'🤪 *falling over* The Trojan War happened because... because... PARIS STOLE HELEN! But not the city Paris, a PERSON named Paris! *hic* So they built a GIANT WOODEN HORSE and hid inside it like some ancient game of hide and seek! "Guys, should we trust this random horse?" "Yeah, what could go wrong?" SPOILER: EVERYTHING WENT WRONG!',
|
|
'🤪 *completely gone* Viking berserkers ate magic mushrooms and fought bears... NAKED! *hic* NAKED MUSHROOM WARRIORS! They probably invented extreme sports! "Hey Olaf, want to sail across the ocean in a wooden boat and raid monasteries?" "SURE BJÖRN, BUT FIRST LET\'S EAT THESE WEIRD MUSHROOMS I FOUND!" *passes out*'
|
|
];
|
|
return this.randomChoice(facts);
|
|
},
|
|
|
|
tellAncientHistory() {
|
|
const level = Math.max(5, this.drunkLevel); // Force drunk level for ancient history
|
|
|
|
const ancientFacts = [
|
|
'🤪 *extremely drunk* Ancient Mesopotamia invented BEER! *hic* They literally wrote the first recipes! Forget the wheel, forget writing... BEER was the real breakthrough! Civilization started because humans wanted to get drunk together! WE ARE ALL DESCENDANTS OF ANCIENT PARTY ANIMALS!',
|
|
'🤪 *slurring badly* The ancient Egyptians... they mummified EVERYTHING! Cats, dogs, birds, crocodiles... *hic* There\'s probably a mummified ancient Egyptian somewhere who got mummified while drunk and is STILL HUNG OVER in the afterlife! "Osiris, my head hurts..." "You\'ve been dead for 4000 years, Kevin!"',
|
|
'🤪 *barely standing* Ancient Greeks invented DEMOCRACY! But only like... 10% of people could vote! *hic* It\'s like having a pizza party but only the pepperoni slices get to decide what toppings to order! Also they did EVERYTHING naked! Olympics, philosophy, probably grocery shopping! ANCIENT NUDIST DEMOCRACY!',
|
|
'🤪 *completely wasted* Stonehenge! *waves arms wildly* Nobody knows what it is! Ancient calendar? Alien landing pad? The world\'s first escape room? *hic* Maybe ancient druids just got really drunk and said "You know what this field needs? GIANT MYSTERIOUS ROCKS!" *falls over*',
|
|
'🤪 *incoherent rambling* Ancient Romans had GLADIATOR FIGHTS for entertainment! *hic* It\'s like WWE but with ACTUAL DEATH! "And his name is JOHN SPARTACUS!" *makes crowd noises* They also had public bathrooms with NO PRIVACY! Just a row of holes! Ancient Romans had no concept of personal space OR personal time!'
|
|
];
|
|
|
|
return this.randomChoice(ancientFacts);
|
|
},
|
|
|
|
randomChoice(array) {
|
|
return array[Math.floor(Math.random() * array.length)];
|
|
}
|
|
}; |