aboutsummaryrefslogtreecommitdiff
path: root/test.rb
blob: 665c21e2e10770f6b25cf23a1818a3ed224ae43c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require_relative 'module'

module Dinobot
  class Test < Module
    def initialize
      super

      @commands << :echo << :error << :timeout << :x3 << :wrongreturn
    end

    def echo(user, channel, argument)
      [[:say, channel, argument]]
    end

    def error(user, channel, argument)
      x
    end

    def timeout(user, channel, argument)
      sleep 60
    end

    def x3(user, channel, argument)
      [[:say, channel, argument]] * 3
    end

    def wrongreturn(user, channel, argument)
      0
    end
  end
end