Nestor

Mon petit bot Discord
Log | Files | Refs

commit 576419f82cd705d4053a52faed144009d98f3577
parent 480aa0aeb42188c1f87e5ca1f3d2182852d6637a
Author: Doshirae <doshirae@mailfence.com>
Date:   Sun, 21 May 2017 14:08:48 +0200

I dunno either

Diffstat:
insultotron.rb | 2+-
nestor.rb | 9+++++++--
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/insultotron.rb b/insultotron.rb @@ -27,7 +27,7 @@ class Insulte def createMartine salope = "SALO" - rand(25..100).times do |_|# (so it makes a cup :D + rand(25..100).times do |_|# (so it makes a cup :D) salope += (rand(0..1) %2 == 0) ? "o" : "O" end salope += "PE" diff --git a/nestor.rb b/nestor.rb @@ -128,8 +128,13 @@ end # <== # insulte ==> -bot.command(:insulte, description: "Renvoie une insulte générée") do |event, mode| - event.respond("#{Insulte.new(mode)}") +bot.command(:insulte, description: "Renvoie une insulte générée") do |event, action| + if action == "add" + lol + else + mode = action + event.respond("#{Insulte.new(mode)}") + end end # <==