discorb 0.5.5 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +57 -0
- data/.github/ISSUE_TEMPLATE/config.yml +8 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +38 -0
- data/.gitignore +3 -3
- data/.yardopts +1 -0
- data/Changelog.md +40 -1
- data/README.md +9 -6
- data/assets/banner.svg +125 -0
- data/docs/application_command.md +19 -19
- data/docs/cli/run.md +11 -1
- data/docs/cli/setup.md +7 -1
- data/docs/events.md +34 -0
- data/docs/extension.md +6 -6
- data/lib/discorb/{command.rb → app_command.rb} +60 -50
- data/lib/discorb/channel.rb +18 -18
- data/lib/discorb/client.rb +47 -35
- data/lib/discorb/color.rb +59 -29
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/embed.rb +12 -12
- data/lib/discorb/emoji.rb +9 -2
- data/lib/discorb/error.rb +7 -1
- data/lib/discorb/event.rb +5 -5
- data/lib/discorb/exe/run.rb +12 -0
- data/lib/discorb/exe/setup.rb +14 -1
- data/lib/discorb/extension.rb +9 -9
- data/lib/discorb/gateway.rb +40 -8
- data/lib/discorb/guild.rb +38 -38
- data/lib/discorb/http.rb +13 -11
- data/lib/discorb/intents.rb +2 -2
- data/lib/discorb/interaction.rb +3 -2
- data/lib/discorb/log.rb +16 -12
- data/lib/discorb/member.rb +3 -3
- data/lib/discorb/message.rb +8 -8
- data/lib/discorb/modules.rb +5 -5
- data/lib/discorb/user.rb +1 -1
- data/lib/discorb/webhook.rb +1 -1
- data/lib/discorb.rb +1 -1
- data/po/yard.pot +37 -37
- data/sig/discorb.rbs +7218 -0
- metadata +8 -4
- data/Gemfile.lock +0 -67
data/po/yard.pot
CHANGED
@@ -322,7 +322,7 @@ msgid "## How do I register an application command?"
|
|
322
322
|
msgstr ""
|
323
323
|
|
324
324
|
#: ../docs/application_command.md:13
|
325
|
-
msgid "Use {Discorb::
|
325
|
+
msgid "Use {Discorb::ApplicationCommand::Handler#slash}, {Discorb::ApplicationCommand::Handler#group} for slash commands, {Discorb::ApplicationCommand::Handler#user_command} for user menu commands, and {Discorb::ApplicationCommand::Handler#message_command} for message menu commands."
|
326
326
|
msgstr ""
|
327
327
|
|
328
328
|
#: ../docs/application_command.md:15
|
@@ -349,7 +349,7 @@ msgid "client.slash(\"hello\", \"Greet for you\") do |interaction|\n"
|
|
349
349
|
msgstr ""
|
350
350
|
|
351
351
|
#: ../docs/application_command.md:36
|
352
|
-
msgid "{Discorb::
|
352
|
+
msgid "{Discorb::ApplicationCommand::Handler#slash} takes 5 arguments:"
|
353
353
|
msgstr ""
|
354
354
|
|
355
355
|
#: ../docs/application_command.md:38
|
@@ -441,7 +441,7 @@ msgid "### Group Slash Commands"
|
|
441
441
|
msgstr ""
|
442
442
|
|
443
443
|
#: ../docs/application_command.md:104
|
444
|
-
msgid "To register a group of slash commands, use {Discorb::
|
444
|
+
msgid "To register a group of slash commands, use {Discorb::ApplicationCommand::Handler#slash_group}."
|
445
445
|
msgstr ""
|
446
446
|
|
447
447
|
#: ../docs/application_command.md:106
|
@@ -473,7 +473,7 @@ msgid "group.slash(\"bump_alert\", \"Whether bot should notify DISBOARD bump.\",
|
|
473
473
|
msgstr ""
|
474
474
|
|
475
475
|
#: ../docs/application_command.md:128
|
476
|
-
msgid "You can make subcommand group by using {Discorb::
|
476
|
+
msgid "You can make subcommand group by using {Discorb::ApplicationCommand::GroupCommand#group}."
|
477
477
|
msgstr ""
|
478
478
|
|
479
479
|
#: ../docs/application_command.md:130
|
@@ -558,7 +558,7 @@ msgid "```ruby\n"
|
|
558
558
|
" interaction.post(\"Hello, #{user.name}!\")\n"
|
559
559
|
"end\n"
|
560
560
|
"```\n"
|
561
|
-
"{Discorb::
|
561
|
+
"{Discorb::ApplicationCommand::Handler#user_command} takes 3 arguments:"
|
562
562
|
msgstr ""
|
563
563
|
|
564
564
|
#: ../docs/application_command.md:216
|
@@ -595,7 +595,7 @@ msgid "```ruby\n"
|
|
595
595
|
msgstr ""
|
596
596
|
|
597
597
|
#: ../docs/application_command.md:238
|
598
|
-
msgid "{Discorb::
|
598
|
+
msgid "{Discorb::ApplicationCommand::Handler#message_command} takes 3 arguments:"
|
599
599
|
msgstr ""
|
600
600
|
|
601
601
|
#: ../docs/application_command.md:248
|
@@ -4592,7 +4592,7 @@ msgstr ""
|
|
4592
4592
|
msgid "The logger."
|
4593
4593
|
msgstr ""
|
4594
4594
|
|
4595
|
-
# @return [Array<Discorb::
|
4595
|
+
# @return [Array<Discorb::ApplicationCommand::Command>]
|
4596
4596
|
#: ../lib/discorb/client.rb:45
|
4597
4597
|
msgid "The commands that the client is using."
|
4598
4598
|
msgstr ""
|
@@ -5262,17 +5262,17 @@ msgstr ""
|
|
5262
5262
|
msgid "A Discord color name."
|
5263
5263
|
msgstr ""
|
5264
5264
|
|
5265
|
-
# Discorb::
|
5265
|
+
# Discorb::ApplicationCommand
|
5266
5266
|
#: ../lib/discorb/command.rb:5
|
5267
5267
|
msgid "Handles application commands."
|
5268
5268
|
msgstr ""
|
5269
5269
|
|
5270
|
-
# Discorb::
|
5270
|
+
# Discorb::ApplicationCommand::Handler
|
5271
5271
|
#: ../lib/discorb/command.rb:9
|
5272
5272
|
msgid "Module to handle commands."
|
5273
5273
|
msgstr ""
|
5274
5274
|
|
5275
|
-
# Discorb::
|
5275
|
+
# Discorb::ApplicationCommand::Handler#slash
|
5276
5276
|
#: ../lib/discorb/command.rb:13
|
5277
5277
|
msgid "Add new top-level command."
|
5278
5278
|
msgstr ""
|
@@ -5364,14 +5364,14 @@ msgstr ""
|
|
5364
5364
|
msgid "tag|param|options"
|
5365
5365
|
msgstr ""
|
5366
5366
|
|
5367
|
-
# Discorb::
|
5367
|
+
# Discorb::ApplicationCommand::Handler#slash_group
|
5368
5368
|
#: ../lib/discorb/command.rb:41
|
5369
5369
|
msgid "Add new command with group."
|
5370
5370
|
msgstr ""
|
5371
5371
|
|
5372
|
-
# @return [Discorb::
|
5373
|
-
# @return [Discorb::
|
5374
|
-
# @return [Discorb::
|
5372
|
+
# @return [Discorb::ApplicationCommand::Command::GroupCommand]
|
5373
|
+
# @return [Discorb::ApplicationCommand::Command::SubcommandGroup]
|
5374
|
+
# @return [Discorb::ApplicationCommand::Command]
|
5375
5375
|
#: ../lib/discorb/command.rb:51
|
5376
5376
|
#: ../lib/discorb/command.rb:69
|
5377
5377
|
#: ../lib/discorb/command.rb:87
|
@@ -5385,7 +5385,7 @@ msgstr ""
|
|
5385
5385
|
msgid "tag|see|file:docs/slash_command.md"
|
5386
5386
|
msgstr ""
|
5387
5387
|
|
5388
|
-
# Discorb::
|
5388
|
+
# Discorb::ApplicationCommand::Handler#message_command
|
5389
5389
|
#: ../lib/discorb/command.rb:58
|
5390
5390
|
msgid "Add message context menu command."
|
5391
5391
|
msgstr ""
|
@@ -5397,13 +5397,13 @@ msgstr ""
|
|
5397
5397
|
msgid "Block to execute."
|
5398
5398
|
msgstr ""
|
5399
5399
|
|
5400
|
-
# @yieldparam [Discorb::
|
5400
|
+
# @yieldparam [Discorb::ApplicationCommandInteraction::UserMenuCommand]
|
5401
5401
|
#: ../lib/discorb/command.rb:69
|
5402
5402
|
#: ../lib/discorb/command.rb:87
|
5403
5403
|
msgid "tag|yieldparam|Interaction"
|
5404
5404
|
msgstr ""
|
5405
5405
|
|
5406
|
-
# @yieldparam [Discorb::
|
5406
|
+
# @yieldparam [Discorb::ApplicationCommandInteraction::UserMenuCommand] Interaction
|
5407
5407
|
#: ../lib/discorb/command.rb:69
|
5408
5408
|
#: ../lib/discorb/command.rb:87
|
5409
5409
|
msgid "object."
|
@@ -5421,7 +5421,7 @@ msgstr ""
|
|
5421
5421
|
msgid "Message object."
|
5422
5422
|
msgstr ""
|
5423
5423
|
|
5424
|
-
# Discorb::
|
5424
|
+
# Discorb::ApplicationCommand::Handler#user_command
|
5425
5425
|
#: ../lib/discorb/command.rb:76
|
5426
5426
|
msgid "Add user context menu command."
|
5427
5427
|
msgstr ""
|
@@ -5431,7 +5431,7 @@ msgstr ""
|
|
5431
5431
|
msgid "User object."
|
5432
5432
|
msgstr ""
|
5433
5433
|
|
5434
|
-
# Discorb::
|
5434
|
+
# Discorb::ApplicationCommand::Handler#setup_commands
|
5435
5435
|
#: ../lib/discorb/command.rb:94
|
5436
5436
|
msgid "Setup commands."
|
5437
5437
|
msgstr ""
|
@@ -5456,7 +5456,7 @@ msgstr ""
|
|
5456
5456
|
msgid "tag|see|Client#initialize"
|
5457
5457
|
msgstr ""
|
5458
5458
|
|
5459
|
-
# Discorb::
|
5459
|
+
# Discorb::ApplicationCommand::Command
|
5460
5460
|
#: ../lib/discorb/command.rb:119
|
5461
5461
|
msgid "Represents a application command."
|
5462
5462
|
msgstr ""
|
@@ -5497,7 +5497,7 @@ msgstr ""
|
|
5497
5497
|
msgid "a new instance of Command"
|
5498
5498
|
msgstr ""
|
5499
5499
|
|
5500
|
-
# Discorb::
|
5500
|
+
# Discorb::ApplicationCommand::Command::SlashCommand
|
5501
5501
|
#: ../lib/discorb/command.rb:163
|
5502
5502
|
msgid "Represents the slash command."
|
5503
5503
|
msgstr ""
|
@@ -5518,18 +5518,18 @@ msgstr ""
|
|
5518
5518
|
msgid "a new instance of SlashCommand"
|
5519
5519
|
msgstr ""
|
5520
5520
|
|
5521
|
-
# Discorb::
|
5521
|
+
# Discorb::ApplicationCommand::Command::SlashCommand#to_s
|
5522
5522
|
#: ../lib/discorb/command.rb:185
|
5523
5523
|
msgid "Returns the commands name."
|
5524
5524
|
msgstr ""
|
5525
5525
|
|
5526
|
-
# Discorb::
|
5526
|
+
# Discorb::ApplicationCommand::Command::GroupCommand
|
5527
5527
|
#: ../lib/discorb/command.rb:236
|
5528
5528
|
msgid "Represents the command with subcommands."
|
5529
5529
|
msgstr ""
|
5530
5530
|
|
5531
|
-
# @return [Array<Discorb::
|
5532
|
-
# @return [Array<Discorb::
|
5531
|
+
# @return [Array<Discorb::ApplicationCommand::Command::SlashCommand, Discorb::ApplicationCommand::Command::SubcommandGroup>]
|
5532
|
+
# @return [Array<Discorb::ApplicationCommand::Command::SlashCommand>]
|
5533
5533
|
#: ../lib/discorb/command.rb:240
|
5534
5534
|
#: ../lib/discorb/command.rb:361
|
5535
5535
|
msgid "The subcommands of the command."
|
@@ -5540,20 +5540,20 @@ msgstr ""
|
|
5540
5540
|
msgid "a new instance of GroupCommand"
|
5541
5541
|
msgstr ""
|
5542
5542
|
|
5543
|
-
# Discorb::
|
5544
|
-
# Discorb::
|
5543
|
+
# Discorb::ApplicationCommand::Command::GroupCommand#slash
|
5544
|
+
# Discorb::ApplicationCommand::Command::SubcommandGroup#slash
|
5545
5545
|
#: ../lib/discorb/command.rb:253
|
5546
5546
|
#: ../lib/discorb/command.rb:376
|
5547
5547
|
msgid "Add new subcommand."
|
5548
5548
|
msgstr ""
|
5549
5549
|
|
5550
|
-
# @return [Discorb::
|
5550
|
+
# @return [Discorb::ApplicationCommand::Command::SlashCommand]
|
5551
5551
|
#: ../lib/discorb/command.rb:258
|
5552
5552
|
#: ../lib/discorb/command.rb:380
|
5553
5553
|
msgid "The added subcommand."
|
5554
5554
|
msgstr ""
|
5555
5555
|
|
5556
|
-
# Discorb::
|
5556
|
+
# Discorb::ApplicationCommand::Command::GroupCommand#group
|
5557
5557
|
#: ../lib/discorb/command.rb:301
|
5558
5558
|
msgid "Add new subcommand group."
|
5559
5559
|
msgstr ""
|
@@ -5568,7 +5568,7 @@ msgstr ""
|
|
5568
5568
|
msgid "Group description."
|
5569
5569
|
msgstr ""
|
5570
5570
|
|
5571
|
-
# Discorb::
|
5571
|
+
# Discorb::ApplicationCommand::Command::GroupCommand#to_s
|
5572
5572
|
#: ../lib/discorb/command.rb:317
|
5573
5573
|
msgid "Returns the command name."
|
5574
5574
|
msgstr ""
|
@@ -5578,7 +5578,7 @@ msgstr ""
|
|
5578
5578
|
msgid "The command name."
|
5579
5579
|
msgstr ""
|
5580
5580
|
|
5581
|
-
# Discorb::
|
5581
|
+
# Discorb::ApplicationCommand::Command::SubcommandGroup
|
5582
5582
|
#: ../lib/discorb/command.rb:357
|
5583
5583
|
msgid "Represents the subcommand group."
|
5584
5584
|
msgstr ""
|
@@ -5589,7 +5589,7 @@ msgid "a new instance of SubcommandGroup"
|
|
5589
5589
|
msgstr ""
|
5590
5590
|
|
5591
5591
|
# Discorb::Activity.types
|
5592
|
-
# Discorb::
|
5592
|
+
# Discorb::ApplicationCommand::Command.types
|
5593
5593
|
#: ../lib/discorb/command.rb:390
|
5594
5594
|
#: ../lib/discorb/gateway_requests.rb:45
|
5595
5595
|
msgid "Returns the value of attribute types."
|
@@ -9873,7 +9873,7 @@ msgstr ""
|
|
9873
9873
|
msgid "Response with `UPDATE_MESSAGE`(`7`)."
|
9874
9874
|
msgstr ""
|
9875
9875
|
|
9876
|
-
# Discorb::
|
9876
|
+
# Discorb::ApplicationCommandInteraction
|
9877
9877
|
#: ../lib/discorb/interaction.rb:245
|
9878
9878
|
msgid "Represents a command interaction."
|
9879
9879
|
msgstr ""
|
@@ -9883,12 +9883,12 @@ msgstr ""
|
|
9883
9883
|
msgid "Implement this."
|
9884
9884
|
msgstr ""
|
9885
9885
|
|
9886
|
-
# Discorb::
|
9886
|
+
# Discorb::ApplicationCommandInteraction::SlashCommand
|
9887
9887
|
#: ../lib/discorb/interaction.rb:254
|
9888
9888
|
msgid "Represents a slash command interaction."
|
9889
9889
|
msgstr ""
|
9890
9890
|
|
9891
|
-
# Discorb::
|
9891
|
+
# Discorb::ApplicationCommandInteraction::UserMenuCommand
|
9892
9892
|
#: ../lib/discorb/interaction.rb:310
|
9893
9893
|
msgid "Represents a user context menu interaction."
|
9894
9894
|
msgstr ""
|
@@ -9898,7 +9898,7 @@ msgstr ""
|
|
9898
9898
|
msgid "The target user."
|
9899
9899
|
msgstr ""
|
9900
9900
|
|
9901
|
-
# Discorb::
|
9901
|
+
# Discorb::ApplicationCommandInteraction::MessageMenuCommand
|
9902
9902
|
#: ../lib/discorb/interaction.rb:325
|
9903
9903
|
msgid "Represents a message context menu interaction."
|
9904
9904
|
msgstr ""
|
@@ -9908,7 +9908,7 @@ msgstr ""
|
|
9908
9908
|
msgid "The target message."
|
9909
9909
|
msgstr ""
|
9910
9910
|
|
9911
|
-
# Discorb::
|
9911
|
+
# Discorb::ApplicationCommandInteraction.command_type
|
9912
9912
|
#: ../lib/discorb/interaction.rb:348
|
9913
9913
|
msgid "Returns the value of attribute command_type."
|
9914
9914
|
msgstr ""
|