discorb 0.19.0 → 0.20.0

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.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_version.yml +2 -2
  3. data/.rubocop.yml +12 -75
  4. data/Changelog.md +10 -0
  5. data/Rakefile +482 -454
  6. data/lib/discorb/allowed_mentions.rb +68 -72
  7. data/lib/discorb/app_command/command.rb +466 -398
  8. data/lib/discorb/app_command/common.rb +65 -25
  9. data/lib/discorb/app_command/handler.rb +304 -266
  10. data/lib/discorb/app_command.rb +5 -5
  11. data/lib/discorb/application.rb +198 -197
  12. data/lib/discorb/asset.rb +101 -101
  13. data/lib/discorb/attachment.rb +134 -119
  14. data/lib/discorb/audit_logs.rb +412 -385
  15. data/lib/discorb/automod.rb +279 -269
  16. data/lib/discorb/channel/base.rb +107 -108
  17. data/lib/discorb/channel/category.rb +32 -32
  18. data/lib/discorb/channel/container.rb +44 -44
  19. data/lib/discorb/channel/dm.rb +26 -28
  20. data/lib/discorb/channel/guild.rb +311 -246
  21. data/lib/discorb/channel/stage.rb +156 -140
  22. data/lib/discorb/channel/text.rb +430 -336
  23. data/lib/discorb/channel/thread.rb +374 -325
  24. data/lib/discorb/channel/voice.rb +85 -79
  25. data/lib/discorb/channel.rb +5 -5
  26. data/lib/discorb/client.rb +635 -621
  27. data/lib/discorb/color.rb +178 -182
  28. data/lib/discorb/common.rb +168 -164
  29. data/lib/discorb/components/button.rb +107 -106
  30. data/lib/discorb/components/select_menu.rb +157 -145
  31. data/lib/discorb/components/text_input.rb +103 -106
  32. data/lib/discorb/components.rb +68 -66
  33. data/lib/discorb/dictionary.rb +135 -135
  34. data/lib/discorb/embed.rb +404 -398
  35. data/lib/discorb/emoji.rb +309 -302
  36. data/lib/discorb/emoji_table.rb +16099 -8857
  37. data/lib/discorb/error.rb +131 -131
  38. data/lib/discorb/event.rb +360 -314
  39. data/lib/discorb/event_handler.rb +39 -39
  40. data/lib/discorb/exe/about.rb +17 -17
  41. data/lib/discorb/exe/irb.rb +72 -67
  42. data/lib/discorb/exe/new.rb +323 -315
  43. data/lib/discorb/exe/run.rb +69 -68
  44. data/lib/discorb/exe/setup.rb +57 -55
  45. data/lib/discorb/exe/show.rb +12 -12
  46. data/lib/discorb/extend.rb +25 -45
  47. data/lib/discorb/extension.rb +89 -83
  48. data/lib/discorb/flag.rb +126 -128
  49. data/lib/discorb/gateway.rb +984 -804
  50. data/lib/discorb/gateway_events.rb +670 -638
  51. data/lib/discorb/gateway_requests.rb +45 -48
  52. data/lib/discorb/guild.rb +2115 -1626
  53. data/lib/discorb/guild_template.rb +280 -241
  54. data/lib/discorb/http.rb +247 -232
  55. data/lib/discorb/image.rb +42 -42
  56. data/lib/discorb/integration.rb +169 -161
  57. data/lib/discorb/intents.rb +161 -163
  58. data/lib/discorb/interaction/autocomplete.rb +76 -62
  59. data/lib/discorb/interaction/command.rb +279 -224
  60. data/lib/discorb/interaction/components.rb +114 -104
  61. data/lib/discorb/interaction/modal.rb +36 -32
  62. data/lib/discorb/interaction/response.rb +379 -336
  63. data/lib/discorb/interaction/root.rb +271 -257
  64. data/lib/discorb/interaction.rb +5 -5
  65. data/lib/discorb/invite.rb +154 -153
  66. data/lib/discorb/member.rb +344 -311
  67. data/lib/discorb/message.rb +615 -544
  68. data/lib/discorb/message_meta.rb +197 -186
  69. data/lib/discorb/modules.rb +371 -290
  70. data/lib/discorb/permission.rb +305 -291
  71. data/lib/discorb/presence.rb +352 -346
  72. data/lib/discorb/rate_limit.rb +81 -76
  73. data/lib/discorb/reaction.rb +55 -54
  74. data/lib/discorb/role.rb +272 -240
  75. data/lib/discorb/shard.rb +76 -74
  76. data/lib/discorb/sticker.rb +193 -171
  77. data/lib/discorb/user.rb +205 -188
  78. data/lib/discorb/utils/colored_puts.rb +16 -16
  79. data/lib/discorb/utils.rb +12 -16
  80. data/lib/discorb/voice_state.rb +305 -281
  81. data/lib/discorb/webhook.rb +537 -507
  82. data/lib/discorb.rb +62 -56
  83. data/sig/discorb/application.rbs +2 -0
  84. data/sig/discorb/automod.rbs +10 -1
  85. data/sig/discorb/guild.rbs +2 -0
  86. data/sig/discorb/message.rbs +2 -0
  87. data/sig/discorb/user.rbs +22 -20
  88. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99a6cb7f4f4f1d7c657209570f1327f6a847b7d7db3fb031c645ca4b0a4464af
4
- data.tar.gz: f207685f5153f73dba3c66f40aaf4ef100063f31746874d57c31b119f5fcb009
3
+ metadata.gz: 48edf0ba9d876f44795aebecf4cbb52242e92d5890eed6fa5f4df8ea64dcc5c6
4
+ data.tar.gz: f39d26d224a2970e9e6a8e0282dd260b5a0d01a889e9534c7060512dade36318
5
5
  SHA512:
6
- metadata.gz: bd641beb11497865a97e267ef1558d1f5162323713f623fcd5109e9e25a7bb41d25e1a59111b0c3b5dcbe43f77a54531973f5874b5d82927956a1ad5f1e4ea03
7
- data.tar.gz: 8d25ed7b8604b59c4a4f3f8467a268472749ccbc010d216787091ea3da60e24e0ddde95add2dc30f6d40637650d19cd9ef22e54dc2141637ac2e96cd4d55ece1
6
+ metadata.gz: 1c8f401b26c4bfdbde8b6e7fd6cc9022cdf9f807b8fc48f62e3cbfa5fe366d6180bdadef07589dd885f22003a6ea1fb2ed9a55357ab8ac5929797767b9d294e1
7
+ data.tar.gz: 122b4b88bdea334e7ae5c3b4aa8f4b3787764c31e17009b590b571c93102f66dadf8db6995b1b2909e8af28ec68928912023ba428a7ee71f5dad292dbdf42d11
@@ -35,9 +35,9 @@ jobs:
35
35
  run: |
36
36
  bundle config --local with 'docs development lint'
37
37
  bundle install
38
- gem update uri
38
+ gem install yard
39
39
  - name: Generate document
40
- run: bundle exec rake document:build_all
40
+ run: rake document:build_all
41
41
  - name: Push document
42
42
  env:
43
43
  SSH_SECRET: ${{ secrets.SSH }}
data/.rubocop.yml CHANGED
@@ -4,101 +4,38 @@ AllCops:
4
4
  Exclude:
5
5
  - lib/discorb/emoji_table.rb
6
6
 
7
+ inherit_gem:
8
+ syntax_tree: config/rubocop.yml
9
+
7
10
  require:
8
11
  - rubocop-rake
9
12
  - rubocop-rspec
10
13
 
11
- # Layout:
12
- # Enabled: false
13
- Metrics:
14
- Enabled: false
15
-
16
- Layout/EndOfLine:
17
- EnforcedStyle: lf
18
-
19
- Layout/IndentationWidth:
20
- AllowedPatterns: ['if']
21
-
22
- Layout/HeredocIndentation:
23
- Enabled: false
24
-
25
- Layout/ClosingHeredocIndentation:
26
- Enabled: false
27
-
28
- Layout/CaseIndentation:
14
+ Naming/VariableNumber:
29
15
  Enabled: false
30
16
 
31
- Layout/ElseAlignment:
17
+ Lint/MissingSuper:
32
18
  Enabled: false
33
19
 
34
- Layout/EndAlignment:
35
- Enabled: false
36
-
37
- Style/TrailingCommaInHashLiteral: # Disabled for rufo
38
- EnforcedStyleForMultiline: consistent_comma
39
-
40
- Style/TrailingCommaInArrayLiteral: # Disabled for rufo
41
- EnforcedStyleForMultiline: consistent_comma
42
-
43
- Style/StringLiterals: # Disabled for rufo
44
- Enabled: true
45
- EnforcedStyle: double_quotes
46
-
47
- Style/TrailingCommaInArguments: # Disabled for rufo
48
- Enabled: false
49
-
50
- Style/StringLiteralsInInterpolation: # Disabled for rufo
51
- Enabled: false
52
-
53
- Layout/SpaceAroundOperators: # Changed for rufo
54
- EnforcedStyleForExponentOperator: space
55
-
56
- Style/StringConcatenation: # + looks better
57
- Enabled: false
58
-
59
- Lint/MissingSuper: # For abstract classes
60
- Enabled: false
61
-
62
- Lint/AssignmentInCondition: # Looks bad
63
- Enabled: false
64
-
65
- Style/PerlBackrefs: # It will be longer
66
- Enabled: false
67
-
68
- Style/RedundantSelf: # Looks local variable
69
- Enabled: false
70
-
71
- Naming/VariableNumber: # Discord API docs naming
72
- Enabled: false
73
-
74
- Style/ParallelAssignment: # It will be longer
75
- Enabled: false
76
-
77
- Style/RedundantInterpolation: # For make it extendable
78
- Enabled: false
79
-
80
- Style/Next: # For make it extendable
81
- Enabled: false
82
-
83
- Lint/ShadowedException: # False positive
20
+ Metrics:
84
21
  Enabled: false
85
22
 
86
- Lint/AmbiguousOperatorPrecedence: # Not needed
23
+ Style/GlobalVars:
87
24
  Enabled: false
88
25
 
89
- Style/GlobalVars: # For /exe
26
+ Style/GuardClause:
90
27
  Enabled: false
91
28
 
92
- Lint/Debugger: # For /exe
29
+ Lint/AssignmentInCondition:
93
30
  Enabled: false
94
31
 
95
- Style/GuardClause: # For make it extendable
32
+ Style/IfUnlessModifier:
96
33
  Enabled: false
97
34
 
98
- Lint/ScriptPermission: # For GitHub Actions
35
+ Style/OptionalBooleanParameter:
99
36
  Enabled: false
100
37
 
101
- Style/NumericLiterals: # For style
38
+ Lint/ScriptPermission:
102
39
  Enabled: false
103
40
 
104
41
  RSpec/FilePath:
data/Changelog.md CHANGED
@@ -4,6 +4,16 @@
4
4
 
5
5
  # Changelog
6
6
 
7
+ ## v0.20
8
+
9
+ ### v0.20.0
10
+
11
+ - Update!: All flags are updated. `User::Flag` has many renames.
12
+ - Change!: Gateway version is always 10 now.
13
+ - Add: Add permissions field.
14
+ - Add: Support resume_gateway_url.
15
+ - Add: Add `AutoModRule#mention_total_limit`, `AutoModRule#allow_list`, and parameters to `Guild#create_automod_rule`.
16
+
7
17
  ## v0.19
8
18
 
9
19
  ### v0.19.0