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 +4 -4
- data/.idea/Rubot.iml +8 -5
- data/Gemfile.lock +1 -1
- data/lib/rubot/classes/client.rb +1 -1
- data/lib/rubot/modules/application_command.rb +3 -2
- data/lib/rubot/version.rb +1 -1
- data/sig/application_command.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1756fcdcad37523b498e5cfd79028da57e9dadfa6c48d5e6a7e6e69f6257b126
|
4
|
+
data.tar.gz: 0fb806d751ea409fc454b3b5a12b73edd862a58d09cf50fcf7e953da0a0217fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
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
|
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.
|
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
data/lib/rubot/classes/client.rb
CHANGED
@@ -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
|
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
data/sig/application_command.rbs
CHANGED
@@ -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
|
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.
|
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-
|
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!
|