rikutelebot 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76b89127099d381383338befe3e006cda84a5876
4
- data.tar.gz: 11a32e24c90a6df9da6e6753e559fc2a310b5347
3
+ metadata.gz: 89edd11235002a6a91c082c027cb418d3a10773f
4
+ data.tar.gz: 786d6dd486ed0ffef10d573b6e2c04d64b2b292c
5
5
  SHA512:
6
- metadata.gz: 71253d82574234567d333fd39e557a33897c062f8222a657842da0b99440b0d0182dbfaed73b45235fc4373c403f293b81c1424cd5fa27a0e272eef2bc3477b0
7
- data.tar.gz: b409758a1df343b539cd4cf82894e8000c26128e2b4217d6cb173964cc1b7ef8861a8d88014fab5691f87709ede87363dfbe5c37b62b9cb633a8629534247af1
6
+ metadata.gz: e5e28019c1cce1488c072cf2a7296b9cf9489eb5d8c8ad5785d61fa88e285a34f491c4168f9729c0cd119e6e0726e8efd5232e8064b5c06227de45e815badc5c
7
+ data.tar.gz: bb46cc88c05052a5c780e137e9695c8b18fbb29ea14c0f4626594306962c68d12095b25e5b664524589f229c9899a4b46503705d96523ba95898d1e791d329f5
data/README.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # Rikutelebot
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rikutelebot`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
3
  ## Installation
8
4
 
9
5
  Add this line to your application's Gemfile:
@@ -32,7 +28,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
28
 
33
29
  ## Contributing
34
30
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rikutelebot.
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/LainLayer/rikutelebot.
36
32
 
37
33
  ## License
38
34
 
@@ -1,3 +1,3 @@
1
1
  module Rikutelebot
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/rikutelebot.rb CHANGED
@@ -20,13 +20,23 @@ module Rikutelebot
20
20
  end
21
21
  end
22
22
 
23
+ Command = Struct.new(:command, :args) do
24
+
25
+ end
26
+
23
27
  class Bot
24
28
  def initialize
25
29
  @conf = Config.new nil
30
+ @state = false
31
+ @commands = []
26
32
  yield @conf
27
33
  end
28
34
 
29
- def run
35
+ def get_message_array
36
+
37
+ end
38
+
39
+ def on_message
30
40
  updates = []
31
41
  j = JSON.parse open(@conf.getupdatesurl).read()
32
42
  for update in j['result']
@@ -39,7 +49,7 @@ module Rikutelebot
39
49
 
40
50
  id = update['message']['chat']['id']
41
51
  title = update['message']['chat']['title']
42
- un = update['message']['chat']['username'] || 'Private chat'
52
+ un = update['message']['chat']['username'] || "(#{id}:#{title})"
43
53
 
44
54
  chat = Chat.new(id, title, un)
45
55
 
@@ -47,6 +57,10 @@ module Rikutelebot
47
57
  end
48
58
  end
49
59
 
60
+ def commands
61
+
62
+ end
63
+
50
64
  end
51
65
 
52
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rikutelebot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-24 00:00:00.000000000 Z
11
+ date: 2017-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler