discord_rubot 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75c7869468638c859819b8b3f09aeaa0605247c66bb0c1a8acf04fbfee3b160b
4
- data.tar.gz: f0acef0fe3294a337263dc1124e1240a72497a3021625fcaabb1a73dc10ef000
3
+ metadata.gz: 1756fcdcad37523b498e5cfd79028da57e9dadfa6c48d5e6a7e6e69f6257b126
4
+ data.tar.gz: 0fb806d751ea409fc454b3b5a12b73edd862a58d09cf50fcf7e953da0a0217fc
5
5
  SHA512:
6
- metadata.gz: c118298fc7aaea5a46f225564a396346ad9888b082cd8e90f9af380dbf41954736efbdcc37b30fd37b8cc49d5be82136e5b511245a73269a7e84423f1b9cfa6d
7
- data.tar.gz: '093adef9059d67eb03c8d621136a5d996644330c862ef80b68faa10cde2d73975a0c14d9190f51565899b6bd11f9cb2cd9a54dc9029fc3e788008485885c68fb'
6
+ metadata.gz: e08ea067ea0f17acda65ad2ea783a4fab46658a768d283e8393be6381b42b0859387021b64d11eb2a303208a9ef1c981755ac828cc66d1c5df0638aa7fabd728
7
+ data.tar.gz: 76b55edfa8cd2ebc42dd6170dac10a5c549e57ab7022650efcdea71c3cb2bcc8e0cf388a54a0e1f1af4f825c566232910df13a08c8708c24be03d89d81e51598
data/.idea/Rubot.iml CHANGED
@@ -29,6 +29,7 @@
29
29
  <orderEntry type="library" scope="PROVIDED" name="netrc (v0.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
30
30
  <orderEntry type="library" scope="PROVIDED" name="opus-ruby (v1.0.1, RVM: ruby-3.0.0) [gem]" level="application" />
31
31
  <orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-3.0.0) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.1, RVM: ruby-3.0.0) [gem]" level="application" />
32
33
  <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-3.0.0) [gem]" level="application" />
33
34
  <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-3.0.0) [gem]" level="application" />
34
35
  <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.5.0, RVM: ruby-3.0.0) [gem]" level="application" />
@@ -39,6 +40,8 @@
39
40
  <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
40
41
  <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.1, RVM: ruby-3.0.0) [gem]" level="application" />
41
42
  <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.35.1, RVM: ruby-3.0.0) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.21.0, RVM: ruby-3.0.0) [gem]" level="application" />
42
45
  <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
43
46
  <orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, RVM: ruby-3.0.0) [gem]" level="application" />
44
47
  <orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.8.2, RVM: ruby-3.0.0) [gem]" level="application" />
@@ -50,21 +53,21 @@
50
53
  <option name="myRootTask">
51
54
  <RakeTaskImpl id="rake">
52
55
  <subtasks>
53
- <RakeTaskImpl description="Build Rubot-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
56
+ <RakeTaskImpl description="Build discord_rubot-0.1.5.gem into the pkg directory" fullCommand="build" id="build" />
54
57
  <RakeTaskImpl id="build">
55
58
  <subtasks>
56
- <RakeTaskImpl description="Generate SHA512 checksum if Rubot-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
59
+ <RakeTaskImpl description="Generate SHA512 checksum if discord_rubot-0.1.5.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
57
60
  </subtasks>
58
61
  </RakeTaskImpl>
59
62
  <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
60
63
  <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
61
- <RakeTaskImpl description="Build and install Rubot-0.1.0.gem into system gems" fullCommand="install" id="install" />
64
+ <RakeTaskImpl description="Build and install discord_rubot-0.1.5.gem into system gems" fullCommand="install" id="install" />
62
65
  <RakeTaskImpl id="install">
63
66
  <subtasks>
64
- <RakeTaskImpl description="Build and install Rubot-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
67
+ <RakeTaskImpl description="Build and install discord_rubot-0.1.5.gem into system gems without network access" fullCommand="install:local" id="local" />
65
68
  </subtasks>
66
69
  </RakeTaskImpl>
67
- <RakeTaskImpl description="Create tag v0.1.0 and build and push Rubot-0.1.0.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
70
+ <RakeTaskImpl description="Create tag v0.1.5 and build and push discord_rubot-0.1.5.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
68
71
  <RakeTaskImpl description="" fullCommand="default" id="default" />
69
72
  <RakeTaskImpl description="" fullCommand="release" id="release" />
70
73
  <RakeTaskImpl id="release">
data/Gemfile.lock CHANGED
@@ -15,7 +15,7 @@ GIT
15
15
  PATH
16
16
  remote: .
17
17
  specs:
18
- discord_rubot (0.1.5)
18
+ discord_rubot (0.1.7)
19
19
 
20
20
  GEM
21
21
  remote: https://rubygems.org/
@@ -13,7 +13,7 @@ module Rubot
13
13
 
14
14
  include ApplicationCommand
15
15
  def initialize(application_commands_path:, commands_path: nil, events_path: nil)
16
- @manager = Manager.new(application_commands_path: application_commands_path, commands_path: commands_path, events_path: events_path)
16
+ @manager = Manager.new(:application_commands_path => application_commands_path, :commands_path => commands_path, :events_path => events_path)
17
17
  super(:token => ENV["BOT_TOKEN"], :intents => :all, :ignore_bots => true)
18
18
  end
19
19
 
@@ -4,12 +4,13 @@ require "discordrb"
4
4
 
5
5
  module Rubot
6
6
  module ApplicationCommand
7
- def add_application_command(command:, subcommand: nil, group: nil, options: ->(option_builder) { option_builder }, &block)
7
+ def add_application_command(command:, subcommand: nil, group: nil, options: ->(option_builder) { option_builder }, type: :chat_input, &block)
8
8
  @application_commands_queue ||= Array[]
9
9
  @application_commands_queue << Hash[
10
10
  :command => command,
11
11
  :subcommand => subcommand,
12
12
  :group => group,
13
+ :type => type,
13
14
  :options => options,
14
15
  :run => block
15
16
  ]
@@ -18,7 +19,7 @@ module Rubot
18
19
  def launch_application_commands
19
20
  @application_commands_queue.each do |command|
20
21
  command.transform_keys!(&:to_sym)
21
- register_application_command(command[:command][:name].to_s, command[:command][:description].to_s) do |option_builder|
22
+ register_application_command(command[:command][:name].to_s, command[:command][:description].to_s, :type => command[:type] || :chat_input) do |option_builder|
22
23
  if command[:subcommand]
23
24
  @application_commands_queue.each do |subcommand|
24
25
  next unless subcommand[:command][:name] == command[:command][:name] && subcommand[:subcommand]
data/lib/rubot/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubot
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.7"
5
5
  end
@@ -1,6 +1,6 @@
1
1
  module Rubot
2
2
  module ApplicationCommand
3
- def add_application_command: (command: Hash[Symbol, String], subcommand: Hash[Symbol, String]?, group: String?) -> void
3
+ def add_application_command: (command: Hash[Symbol, String], subcommand: Hash[Symbol, String]?, group: String?, type: Symbol) -> void
4
4
  def launch_application_commands: -> []
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discord_rubot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Senchuu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-29 00:00:00.000000000 Z
11
+ date: 2022-09-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use rubot as a command handler for, your ruby written discord bot. Simply
14
14
  to use, and fun!