Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Commit

Permalink
[Fixes #109] Add a slap command. Get slapped, you memes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chew committed Feb 18, 2018
1 parent 8ea7048 commit 19ec3ed
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bot.rb
Expand Up @@ -97,7 +97,7 @@
c.plugins.prefix = botprefix

# Load modules.
c.plugins.plugins = [Misc, Minecraft, Owner, Restart, RandomCat, MemeDB, Quotes, NickServ, InviteToJoin, Bitcoin, About, English, Emoji, Food, Grammar, Formatting, BaseS4, GitHub, Google, Cleverbot, Channel, Language, Replace, Streams, Music, Stats]
c.plugins.plugins = [Misc, Minecraft, Owner, Restart, RandomCat, MemeDB, Quotes, NickServ, InviteToJoin, Bitcoin, About, English, Emoji, Food, Grammar, Formatting, BaseS4, GitHub, Google, Cleverbot, Channel, Language, Replace, Streams, Music, Stats, Attack]
end
end

Expand Down
32 changes: 32 additions & 0 deletions plugins/attack.rb
@@ -0,0 +1,32 @@
class Attack
include Cinch::Plugin

match /slap (.+)/, method: :slap

def slap(m, user)
user.delete!(' ')
item = [
'cast iron skillet', 'large trout', 'baseball bat', 'cricket bat', 'wooden cane', 'nail', 'printer', 'shovel', 'pair of trousers', 'diamond sword', 'baguette', 'physics textbook', 'toaster', 'portrait of Ron Swanson', 'television', 'mau5head', 'five ton truck', 'roll of duct tape', 'book', 'laptop', 'old television', 'sack of rocks', 'rainbow trout', 'cobblestone block', 'lava bucket', 'rubber chicken', 'spiked bat', 'gold block', 'fire extinguisher', 'heavy rock', 'chunk of dirt'
].sample
throws = %w[throws flings chucks].sample
hits = %w[hits whacks slaps smacks].sample
where = ['in the chest', 'on the head', 'on the bum'].sample
templates = [
"#{hits} #{user} with a #{item}.",
"#{hits} #{user} around a bit with a #{item}.",
"#{throws} a #{item} at #{user}.",
"#{throws} a few #{item}s at #{user}.",
"grabs a #{item} and #{throws} it in #{user}'s face.",
"launches a #{item} in #{user}'s general direction.",
"sits on #{user}'s face while slamming a #{item} into their crotch.",
"starts slapping #{user} silly with a #{item}.",
"holds #{user} down and repeatedly #{hits} them with a #{item}.",
"prods #{user} with a #{item}.",
"picks up a #{item} and #{hits} #{user} with it.",
"ties #{user} to a chair and #{throws} a #{item} at them.",
"#{hits} #{user} #{where} with a #{item}.",
"ties #{user} to a pole and whips them with a #{item}."
].sample
m.reply Format(:italic, templates)
end
end

0 comments on commit 19ec3ed

Please sign in to comment.