Sha256: 713f62d373456566de3d4c9f29dd6e10ceaa6b3c80fe9582dc20ca0c8af3f6a9

Contents?: true

Size: 1.1 KB

Versions: 43

Compression:

Stored size: 1.1 KB

Contents

module Plugins
  class Eightball
    include Cinch::Plugin
    include Cinch::Helpers

    enable_acl

    set(
        plugin_name: "8ball",
        help:     "The Magic 8ball has all the answers!\nUsage: `?8ball [question? <question? <...>>]`",
        react_on: :channel)

    # Variables
    @@eightball = [
        "It is certain",
        "It is decidedly so",
        "Without a doubt",
        "Yes - definitely",
        "You may rely on it",
        "As I see it, yes",
        "Most likely",
        "Outlook good",
        "Signs point to yes",
        "Yes",
        "Reply hazy, try again",
        "Ask again later",
        "Better not tell you now",
        "Cannot predict now",
        "Concentrate and ask again",
        "Don't count on it",
        "My reply is no",
        "My sources say no",
        "Outlook not so good",
        "Very doubtful"
    ]

    # Regex
    match /8ball (.+)/

    # Methods
    def shake!
      @@eightball.sample
    end

    def execute(m, s)
      m.safe_reply @@eightball.sample, true
    end

  end
end

# AutoLoad
Bot.config.plugins.plugins.push Plugins::Eightball

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
zetabot-2.1.2 lib/Zeta/plugins/eightball.rb
zetabot-2.1.1 lib/Zeta/plugins/eightball.rb
zetabot-2.1.0 lib/Zeta/plugins/eightball.rb
zetabot-2.0.9 lib/Zeta/plugins/eightball.rb
zetabot-2.0.8 lib/Zeta/plugins/eightball.rb
zetabot-2.0.7 lib/Zeta/plugins/eightball.rb
zetabot-2.0.6 lib/Zeta/plugins/eightball.rb
zetabot-2.0.5 lib/Zeta/plugins/eightball.rb
zetabot-2.0.4 lib/Zeta/plugins/eightball.rb
zetabot-2.0.3 lib/Zeta/plugins/eightball.rb
zetabot-2.0.2 lib/Zeta/plugins/eightball.rb
zetabot-2.0.1 lib/Zeta/plugins/eightball.rb
zetabot-2.0.0 lib/Zeta/plugins/eightball.rb
zetabot-1.1.0 lib/Zeta/plugins/eightball.rb
zetabot-1.0.7 lib/Zeta/plugins/eightball.rb
zetabot-1.0.6 lib/Zeta/plugins/eightball.rb
zetabot-1.0.5 lib/Zeta/plugins/eightball.rb
zetabot-1.0.4 lib/Zeta/plugins/eightball.rb
zetabot-1.0.3 lib/Zeta/plugins/eightball.rb
zetabot-1.0.2 lib/Zeta/plugins/eightball.rb