onyxcord-webhooks 1.1.0 → 1.1.3
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 +4 -4
- data/lib/onyxcord/webhooks/version.rb +1 -1
- data/lib/onyxcord/webhooks/view.rb +29 -11
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 736c8af073caea62683fed0ccbc9f51f8c80252f44cf7d741a26b11baa51379a
|
|
4
|
+
data.tar.gz: 128b06ac7333fdfd3cf82f799042ff69b440be9bea013515f935ebc9b8efb749
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f199e3ac474509e4efd223fd794e0f6cd204e7c63891b0006d72243b87556aaafd7f2d0de50d8a79a21c801364429ef94a98bea978576da57a1af34817058dc
|
|
7
|
+
data.tar.gz: f3b533121526d85de84bdf3f849f4b0dbc208d015f1c1022ea89495fbd59a3c2730a7876755e1b35ce8c362ddae46876a7c5183e6133ab4698908d1cfdb13c6b
|
|
@@ -494,45 +494,63 @@ class OnyxCord::Webhooks::View
|
|
|
494
494
|
|
|
495
495
|
# Add a row component to the view.
|
|
496
496
|
# @see RowBuilder#initialize
|
|
497
|
-
def row(
|
|
498
|
-
|
|
497
|
+
def row(id: nil, &block)
|
|
498
|
+
builder = RowBuilder.new(id: id)
|
|
499
|
+
@components << builder
|
|
500
|
+
yield builder if block_given?
|
|
501
|
+
builder
|
|
499
502
|
end
|
|
500
503
|
|
|
501
504
|
# Add a file component to the view.
|
|
502
505
|
# @see FileBuilder#initialize
|
|
503
506
|
def file(...)
|
|
504
|
-
|
|
507
|
+
builder = FileBuilder.new(...)
|
|
508
|
+
@components << builder
|
|
509
|
+
builder
|
|
505
510
|
end
|
|
506
511
|
|
|
507
512
|
alias_method :file_display, :file
|
|
508
513
|
|
|
509
514
|
# Add a section component to the view.
|
|
510
515
|
# @see SectionBuilder#initialize
|
|
511
|
-
def section(
|
|
512
|
-
|
|
516
|
+
def section(id: nil, &block)
|
|
517
|
+
builder = SectionBuilder.new(id: id)
|
|
518
|
+
@components << builder
|
|
519
|
+
yield builder if block_given?
|
|
520
|
+
builder
|
|
513
521
|
end
|
|
514
522
|
|
|
515
523
|
# Add a separator component to the view.
|
|
516
524
|
# @see SeparatorBuilder#initialize
|
|
517
525
|
def separator(...)
|
|
518
|
-
|
|
526
|
+
builder = SeparatorBuilder.new(...)
|
|
527
|
+
@components << builder
|
|
528
|
+
builder
|
|
519
529
|
end
|
|
520
530
|
|
|
521
531
|
# Add a container component to the view.
|
|
522
532
|
# @see ContainerBuilder#initialize
|
|
523
|
-
def container(
|
|
524
|
-
|
|
533
|
+
def container(id: nil, color: nil, colour: nil, spoiler: false, &block)
|
|
534
|
+
builder = ContainerBuilder.new(id: id, color: color, colour: colour, spoiler: spoiler)
|
|
535
|
+
@components << builder
|
|
536
|
+
yield builder if block_given?
|
|
537
|
+
builder
|
|
525
538
|
end
|
|
526
539
|
|
|
527
540
|
# Add a text display component to the view.
|
|
528
541
|
# @see TextDisplayBuilder#initialize
|
|
529
542
|
def text_display(...)
|
|
530
|
-
|
|
543
|
+
builder = TextDisplayBuilder.new(...)
|
|
544
|
+
@components << builder
|
|
545
|
+
builder
|
|
531
546
|
end
|
|
532
547
|
|
|
533
548
|
# Add a media gallery component to the view.
|
|
534
549
|
# @see MediaGalleryBuilder#initialize
|
|
535
|
-
def media_gallery(
|
|
536
|
-
|
|
550
|
+
def media_gallery(id: nil, &block)
|
|
551
|
+
builder = MediaGalleryBuilder.new(id: id)
|
|
552
|
+
@components << builder
|
|
553
|
+
yield builder if block_given?
|
|
554
|
+
builder
|
|
537
555
|
end
|
|
538
556
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onyxcord-webhooks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gustavo Silva
|
|
@@ -16,6 +16,9 @@ dependencies:
|
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: 2.0.0
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '3'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -23,6 +26,9 @@ dependencies:
|
|
|
23
26
|
- - ">="
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: 2.0.0
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '3'
|
|
26
32
|
description: A webhook client for OnyxCord, a Ruby Discord library based on discordrb
|
|
27
33
|
and updated with Components V2 support.
|
|
28
34
|
email:
|