discordrb 3.4.3 → 3.6.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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/Dockerfile +13 -0
  3. data/.devcontainer/devcontainer.json +29 -0
  4. data/.devcontainer/postcreate.sh +4 -0
  5. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -1
  6. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -1
  7. data/.github/workflows/ci.yml +78 -0
  8. data/.github/workflows/codeql.yml +65 -0
  9. data/.github/workflows/deploy.yml +54 -0
  10. data/.github/workflows/release.yml +45 -0
  11. data/.markdownlint.json +4 -0
  12. data/.rubocop.yml +58 -2
  13. data/CHANGELOG.md +485 -225
  14. data/LICENSE.txt +1 -1
  15. data/README.md +38 -26
  16. data/discordrb-webhooks.gemspec +4 -1
  17. data/discordrb.gemspec +18 -10
  18. data/lib/discordrb/api/application.rb +278 -0
  19. data/lib/discordrb/api/channel.rb +222 -18
  20. data/lib/discordrb/api/interaction.rb +63 -0
  21. data/lib/discordrb/api/invite.rb +2 -2
  22. data/lib/discordrb/api/server.rb +123 -66
  23. data/lib/discordrb/api/user.rb +20 -5
  24. data/lib/discordrb/api/webhook.rb +72 -0
  25. data/lib/discordrb/api.rb +35 -25
  26. data/lib/discordrb/bot.rb +437 -66
  27. data/lib/discordrb/cache.rb +41 -22
  28. data/lib/discordrb/commands/command_bot.rb +13 -21
  29. data/lib/discordrb/commands/container.rb +1 -1
  30. data/lib/discordrb/commands/parser.rb +7 -7
  31. data/lib/discordrb/commands/rate_limiter.rb +1 -1
  32. data/lib/discordrb/container.rb +178 -3
  33. data/lib/discordrb/data/activity.rb +1 -1
  34. data/lib/discordrb/data/application.rb +1 -0
  35. data/lib/discordrb/data/attachment.rb +38 -3
  36. data/lib/discordrb/data/audit_logs.rb +3 -3
  37. data/lib/discordrb/data/avatar_decoration.rb +26 -0
  38. data/lib/discordrb/data/call.rb +22 -0
  39. data/lib/discordrb/data/channel.rb +299 -30
  40. data/lib/discordrb/data/collectibles.rb +45 -0
  41. data/lib/discordrb/data/component.rb +229 -0
  42. data/lib/discordrb/data/embed.rb +10 -3
  43. data/lib/discordrb/data/emoji.rb +20 -1
  44. data/lib/discordrb/data/integration.rb +45 -3
  45. data/lib/discordrb/data/interaction.rb +937 -0
  46. data/lib/discordrb/data/invite.rb +1 -1
  47. data/lib/discordrb/data/member.rb +236 -44
  48. data/lib/discordrb/data/message.rb +278 -51
  49. data/lib/discordrb/data/overwrite.rb +15 -7
  50. data/lib/discordrb/data/primary_server.rb +60 -0
  51. data/lib/discordrb/data/profile.rb +2 -7
  52. data/lib/discordrb/data/reaction.rb +2 -1
  53. data/lib/discordrb/data/recipient.rb +1 -1
  54. data/lib/discordrb/data/role.rb +204 -18
  55. data/lib/discordrb/data/server.rb +194 -118
  56. data/lib/discordrb/data/server_preview.rb +68 -0
  57. data/lib/discordrb/data/snapshot.rb +110 -0
  58. data/lib/discordrb/data/user.rb +132 -12
  59. data/lib/discordrb/data/voice_region.rb +1 -0
  60. data/lib/discordrb/data/webhook.rb +99 -9
  61. data/lib/discordrb/data.rb +9 -0
  62. data/lib/discordrb/errors.rb +47 -3
  63. data/lib/discordrb/events/await.rb +1 -1
  64. data/lib/discordrb/events/channels.rb +38 -1
  65. data/lib/discordrb/events/generic.rb +2 -0
  66. data/lib/discordrb/events/guilds.rb +6 -1
  67. data/lib/discordrb/events/interactions.rb +575 -0
  68. data/lib/discordrb/events/invites.rb +2 -0
  69. data/lib/discordrb/events/members.rb +19 -2
  70. data/lib/discordrb/events/message.rb +42 -8
  71. data/lib/discordrb/events/presence.rb +23 -14
  72. data/lib/discordrb/events/raw.rb +1 -0
  73. data/lib/discordrb/events/reactions.rb +2 -1
  74. data/lib/discordrb/events/roles.rb +2 -0
  75. data/lib/discordrb/events/threads.rb +100 -0
  76. data/lib/discordrb/events/typing.rb +1 -0
  77. data/lib/discordrb/events/voice_server_update.rb +1 -0
  78. data/lib/discordrb/events/voice_state_update.rb +1 -0
  79. data/lib/discordrb/events/webhooks.rb +1 -0
  80. data/lib/discordrb/gateway.rb +57 -28
  81. data/lib/discordrb/paginator.rb +3 -3
  82. data/lib/discordrb/permissions.rb +71 -35
  83. data/lib/discordrb/version.rb +1 -1
  84. data/lib/discordrb/voice/encoder.rb +2 -2
  85. data/lib/discordrb/voice/network.rb +18 -7
  86. data/lib/discordrb/voice/sodium.rb +3 -1
  87. data/lib/discordrb/voice/voice_bot.rb +3 -3
  88. data/lib/discordrb/webhooks.rb +2 -0
  89. data/lib/discordrb/websocket.rb +0 -10
  90. data/lib/discordrb.rb +54 -5
  91. metadata +87 -25
  92. data/.circleci/config.yml +0 -126
  93. data/.codeclimate.yml +0 -16
  94. data/.travis.yml +0 -32
  95. data/bin/travis_build_docs.sh +0 -17
data/CHANGELOG.md CHANGED
@@ -1,21 +1,130 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
5
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
 
7
- ## [3.4.2] - 2020-2-5
8
- [3.4.1]: https://github.com/shardlab/discordrb/releases/tag/v3.4.2
8
+ ## [3.6.0] - 2025-10-22
9
+
10
+ [3.5.0]: https://github.com/shardlab/discordrb/releases/tag/v3.6.0
11
+
12
+ [View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.5.0..v3.6.0)
13
+
14
+ ### Summary
15
+
16
+ ## What's Changed
17
+
18
+ - feat: Bot#invite_url - scope & redirect_uri params by @Birdie0 in https://github.com/shardlab/discordrb/pull/241
19
+ - Update ping.rb by @gustavomgama in https://github.com/shardlab/discordrb/pull/243
20
+ - Fix buttons and string selects without emojis breaking due to API change by @wouterdedroog in https://github.com/shardlab/discordrb/pull/249
21
+ - Update webhook URLs to v9 by @advaith1 in https://github.com/shardlab/discordrb/pull/264
22
+ - Update Version Requirements to resolve CircleCI failures by @joshbuker in https://github.com/shardlab/discordrb/pull/265
23
+ - Add default_member_permissions and contexts fields to application commands by @wouterdedroog in https://github.com/shardlab/discordrb/pull/254
24
+ - add min/max_length support for string option and min/max_value for integer by @Birdie0 in https://github.com/shardlab/discordrb/pull/252
25
+ - Feat: search guild members by @Droid00000 in https://github.com/shardlab/discordrb/pull/277
26
+ - Add crossposts. by @Droid00000 in https://github.com/shardlab/discordrb/pull/280
27
+ - Message Flags by @Droid00000 in https://github.com/shardlab/discordrb/pull/292
28
+ - Allow supressing embeds on Message by @Quintasan in https://github.com/shardlab/discordrb/pull/240
29
+ - feat: message threads by @Droid00000 in https://github.com/shardlab/discordrb/pull/295
30
+ - feat: attachments in interaction responses by @Droid00000 in https://github.com/shardlab/discordrb/pull/296
31
+ - Remove User Login. by @Droid00000 in https://github.com/shardlab/discordrb/pull/273
32
+ - Custom Intents by @Droid00000 in https://github.com/shardlab/discordrb/pull/283
33
+ - feature: channel pins update event by @Droid00000 in https://github.com/shardlab/discordrb/pull/294
34
+ - Ruby 3.1 EOL & Workflows by @Droid00000 in https://github.com/shardlab/discordrb/pull/304
35
+ - Update link of Documentation in README.md by @soukouki in https://github.com/shardlab/discordrb/pull/287
36
+ - chore: rubocop Style/BitwisePredicate by @Daniel-Worrall in https://github.com/shardlab/discordrb/pull/289
37
+ - feat: resume gateway URL by @Droid00000 in https://github.com/shardlab/discordrb/pull/308
38
+ - fix: don't send heartbeats unless we're connected by @Droid00000 in https://github.com/shardlab/discordrb/pull/309
39
+ - Ruby Webhooks EOL Version Bump by @Droid00000 in https://github.com/shardlab/discordrb/pull/306
40
+ - bugfixes: emoji parsing & removing timeouts by @Droid00000 in https://github.com/shardlab/discordrb/pull/305
41
+ - Bugfix - Discordrb::Message#reacted_with by @y-bonfire in https://github.com/shardlab/discordrb/pull/288
42
+ - Fix permission overwrites mapping by @ceud in https://github.com/shardlab/discordrb/pull/267
43
+ - feat: missing member & user attributes by @Droid00000 in https://github.com/shardlab/discordrb/pull/313
44
+ - feat: add server avatar by @swarley in https://github.com/shardlab/discordrb/pull/146
45
+ - feat: autocomplete interactions by @Droid00000 in https://github.com/shardlab/discordrb/pull/299
46
+ - fix: broken members on MESSAGE_CREATE due to recent changes by @Droid00000 in https://github.com/shardlab/discordrb/pull/315
47
+ - cache active threads on GUILD_CREATE events by @Droid00000 in https://github.com/shardlab/discordrb/pull/316
48
+ - fix: allow raw and application command event handlers to co-exist by @Droid00000 in https://github.com/shardlab/discordrb/pull/310
49
+ - Fix Guild Bans by @Droid00000 in https://github.com/shardlab/discordrb/pull/279
50
+ - fix: remove WSCS's monkey patch by @Droid00000 in https://github.com/shardlab/discordrb/pull/325
51
+ - feat: server tags by @Droid00000 in https://github.com/shardlab/discordrb/pull/323
52
+ - fix: lazily cache un-cached members by @Droid00000 in https://github.com/shardlab/discordrb/pull/322
53
+ - fix: lazily request author for messages by @swarley in https://github.com/shardlab/discordrb/pull/130
54
+ - feat: increased pinned message limits by @Droid00000 in https://github.com/shardlab/discordrb/pull/324
55
+ - Fix CI by @Daniel-Worrall in https://github.com/shardlab/discordrb/pull/312
56
+ - feat: application command permission overwrites by @Droid00000 in https://github.com/shardlab/discordrb/pull/326
57
+ - feat: missing role attributes by @Droid00000 in https://github.com/shardlab/discordrb/pull/303
58
+ - feat: server previews by @Droid00000 in https://github.com/shardlab/discordrb/pull/332
59
+ - feat: gradient roles by @Droid00000 in https://github.com/shardlab/discordrb/pull/337
60
+ - feat: missing attachment attributes by @Droid00000 in https://github.com/shardlab/discordrb/pull/338
61
+ - feat: NSFW by @Droid00000 in https://github.com/shardlab/discordrb/pull/336
62
+ - feat: Channel#send_message! by @Droid00000 in https://github.com/shardlab/discordrb/pull/335
63
+ - docs: hide all initializers by @Droid00000 in https://github.com/shardlab/discordrb/pull/345
64
+ - feat: base64 encoder by @Droid00000 in https://github.com/shardlab/discordrb/pull/346
65
+ - fix: actually set the icon by @Droid00000 in https://github.com/shardlab/discordrb/pull/347
66
+ - feat: message types by @Droid00000 in https://github.com/shardlab/discordrb/pull/349
67
+ - feat: Add message type methods by @swarley in https://github.com/shardlab/discordrb/pull/85
68
+ - style: use (...) syntax to forward arguments by @Droid00000 in https://github.com/shardlab/discordrb/pull/348
69
+ - fix: return raw error codes by @Droid00000 in https://github.com/shardlab/discordrb/pull/317
70
+ - add thread channel parmaeters to Channel#update by @mrhappyma in https://github.com/shardlab/discordrb/pull/344
71
+ - fix: forward &block on send_message! by @Droid00000 in https://github.com/shardlab/discordrb/pull/342
72
+ - feat: missing permissions by @Droid00000 in https://github.com/shardlab/discordrb/pull/341
73
+ - Fix - Allow mixing groups and subcommands by @itsthedevman in https://github.com/shardlab/discordrb/pull/244
74
+ - fix: use response-data to update server members by @Droid00000 in https://github.com/shardlab/discordrb/pull/362
75
+ - feat: allow creation of forum posts by @Droid00000 in https://github.com/shardlab/discordrb/pull/360
76
+ - feat: Message#mentions? by @Droid00000 in https://github.com/shardlab/discordrb/pull/356
77
+ - fix: include names on server previews by @Droid00000 in https://github.com/shardlab/discordrb/pull/355
78
+ - feat: add server attribute to MESSAGE_DELETE by @Droid00000 in https://github.com/shardlab/discordrb/pull/358
79
+ - feat: handle USER_UPDATE events by @Droid00000 in https://github.com/shardlab/discordrb/pull/357
80
+ - fix: server boost caching by @Droid00000 in https://github.com/shardlab/discordrb/pull/359
81
+ - feat: application emojis by @Droid00000 in https://github.com/shardlab/discordrb/pull/314
82
+ - feat: message forwards by @Droid00000 in https://github.com/shardlab/discordrb/pull/340
83
+ - feat: fix thread caching by @Droid00000 in https://github.com/shardlab/discordrb/pull/363
84
+ - feat: gh actions by @swarley in https://github.com/shardlab/discordrb/pull/371
85
+
86
+ ## New Contributors
87
+
88
+ - @gustavomgama made their first contribution in https://github.com/shardlab/discordrb/pull/243
89
+ - @wouterdedroog made their first contribution in https://github.com/shardlab/discordrb/pull/249
90
+ - @advaith1 made their first contribution in https://github.com/shardlab/discordrb/pull/264
91
+ - @joshbuker made their first contribution in https://github.com/shardlab/discordrb/pull/265
92
+ - @Droid00000 made their first contribution in https://github.com/shardlab/discordrb/pull/277
93
+ - @Quintasan made their first contribution in https://github.com/shardlab/discordrb/pull/240
94
+ - @soukouki made their first contribution in https://github.com/shardlab/discordrb/pull/287
95
+ - @y-bonfire made their first contribution in https://github.com/shardlab/discordrb/pull/288
96
+ - @ceud made their first contribution in https://github.com/shardlab/discordrb/pull/267
97
+ - @mrhappyma made their first contribution in https://github.com/shardlab/discordrb/pull/344
98
+ - @itsthedevman made their first contribution in https://github.com/shardlab/discordrb/pull/244
99
+
100
+ **Full Changelog**: https://github.com/shardlab/discordrb/compare/v3.5.0...v3.6.0
101
+
102
+ ## [3.5.0] - 2023-07-05
103
+
104
+ [3.5.0]: https://github.com/shardlab/discordrb/releases/tag/v3.5.0
105
+
106
+ [View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.2..v3.5.0)
107
+
108
+ ### Summary
109
+
110
+ Lots of changes, Discord is changing their API and we're trying to keep up. This release is a bit of a mess, but it's a necessary one.
111
+
112
+ ## [3.4.2] - 2020-02-05
113
+
114
+ [3.4.2]: https://github.com/shardlab/discordrb/releases/tag/v3.4.2
9
115
 
10
116
  [View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.1..v3.4.2)
11
117
 
12
118
  ### Summary
119
+
13
120
  I failed to update rest-client dependencies properly, and discovered that you can't republish gem versions the hard way.
14
121
 
15
122
  ### Changed
123
+
16
124
  - `rest-client` has a requirement of `>= 2.0.0` on both `discordrb` and `discordrb-webhooks`
17
125
 
18
- ## [3.4.1] - 2020-2-4
126
+ ## [3.4.1] - 2020-02-04
127
+
19
128
  [3.4.1]: https://github.com/shardlab/discordrb/releases/tag/v3.4.1
20
129
 
21
130
  [View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.0..v3.4.1)
@@ -26,10 +135,12 @@ With 3.4.0, mistakes were made during the version bump leading to a bit of a dep
26
135
  This micro bump fixes this, fixes a few other code issues, and adds a few minor features.
27
136
 
28
137
  ### Added
138
+
29
139
  - Added support for `competing` activity types ([#21](https://github.com/shardlab/discordrb/pull/21), thanks @kaine119)
30
140
  - Support for a callable command_does_not_exist_message ([#25](https://github.com/shardlab/discordrb/pull/25), thanks @kmcphillips)
31
141
 
32
142
  ### Fixed
143
+
33
144
  - `Bot#send_temporary_message` now properly passes `message_reference` ([#17](https://github.com/shardlab/discordrb/pull/17) thanks @swarley)
34
145
  - Rate limit precision is only supplied when the route requires headers ([#11](https://github.com/shardlab/discordrb/pull/11) thanks @dali546)
35
146
  - Remove pointless conditional in `Invite` initializer ([#26](https://github.com/shardlab/discordrb/pull/26) thanks @swarley)
@@ -37,6 +148,7 @@ This micro bump fixes this, fixes a few other code issues, and adds a few minor
37
148
  - Links to messages now work when a `guild_id` is not present in a non DM message. ([#27](https://github.com/shardlab/discordrb/pull/27) thanks @swarley)
38
149
 
39
150
  ## [3.4.0] - 2020-12-06
151
+
40
152
  [3.4.0]: https://github.com/shardlab/discordrb/releases/tag/v3.3.0
41
153
 
42
154
  [View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.0...v3.3.0)
@@ -53,8 +165,8 @@ Intents allow you to pick and choose what types of events are fed to your bot ov
53
165
  Discordrb::Bot.new(token: 'B0T.T0K3N', intents: %i[servers server_messages])
54
166
  ```
55
167
 
56
-
57
168
  In this example, we would only recieve the following events
169
+
58
170
  - GUILD_CREATE
59
171
  - GUILD_UPDATE
60
172
  - GUILD_DELETE
@@ -74,7 +186,7 @@ This feature is still experimental, as it is still unclear how some interactions
74
186
 
75
187
  ### Added
76
188
 
77
- - `Bot#parse_mentions`, which extracts *all* mentions found in a string ([#526](https://github.com/discordrb/discordrb/pull/526), thanks @SanksTheYokai)
189
+ - `Bot#parse_mentions`, which extracts _all_ mentions found in a string ([#526](https://github.com/discordrb/discordrb/pull/526), thanks @SanksTheYokai)
78
190
  - Issue and pull request templates ([#585](https://github.com/discordrb/discordrb/pull/585))
79
191
  - `Server#bot` method for obtaining your bot's own `Member` on a particular server ([#597](https://github.com/discordrb/discordrb/pull/597))
80
192
  - `Attachment#spoiler?`, to check if an attachment is a spoiler or not ([#603](https://github.com/discordrb/discordrb/pull/603), thanks @swarley)
@@ -147,7 +259,7 @@ This feature is still experimental, as it is still unclear how some interactions
147
259
  - **(breaking change)** `Message#reactions` is changed to return an Array instead of a hash, fixing reactions with the same `name` value from being discarded (#[593](https://github.com/discordrb/discordrb/pull/596))
148
260
  - `Channel#nsfw=` correctly forwards updated value to the API ([#628](https://github.com/discordrb/discordrb/pull/628))
149
261
  - `Emoji#==` works correctly for unicode emoji ([#590](https://github.com/discordrb/discordrb/pull/590), thanks @soukouki)
150
- - Attribute matching for voice state update events ([#625](https://github.com/discordrb/discordrb/pull/625), thanks @swarley)
262
+ - Attribute matching for voice state update events ([#625](https://github.com/discordrb/discordrb/pull/625), thanks @swarley)
151
263
  - `Emoji#to_reaction` works correctly for unicode emoji ([#642](https://github.com/discordrb/discordrb/pull/642), thanks @z64)
152
264
  - `Server#add_member_using_token` returns `nil` when user is already a member ([#643](https://github.com/discordrb/discordrb/pull/643), thanks @swarley)
153
265
  - `CommandBot`'s `Integer` parser interprets all integers as base 10 ([#656](https://github.com/discordrb/discordrb/pull/656), thanks @joshleblanc)
@@ -165,11 +277,11 @@ This feature is still experimental, as it is still unclear how some interactions
165
277
  - Removed dependency on `rbnacl` in favor of our own FFI bindings ([#641](https://github.com/discordrb/discordrb/pull/641), thanks @z64)
166
278
 
167
279
  ## [3.3.0] - 2018-10-27
280
+
168
281
  [3.3.0]: https://github.com/discordrb/discordrb/releases/tag/v3.3.0
169
282
 
170
283
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.1...v3.3.0)
171
284
 
172
-
173
285
  ### Summary
174
286
 
175
287
  3.3.0 brings discordrb up to speed with new features added to Discord's API over the last year. Included is a large number of fixes, optimizations, and library features.
@@ -184,7 +296,7 @@ Since there is a lot here, here are highlights of the more notable changes in th
184
296
  - `CommandBot` now supports a new method of "aliasing" commands with the `aliases:` keyword. It accepts an array
185
297
  of symbols of alternate command names. Currently this is supported by passing an array of symbols for the command
186
298
  name itself, but this essentially makes "copies" of the command, meaning each alias will show up in your help command.
187
- Using `aliases` instead, the library will recognize that these other names *are aliases* instead of copying the command.
299
+ Using `aliases` instead, the library will recognize that these other names _are aliases_ instead of copying the command.
188
300
  Aliases will be listed when users use `!help` with the command name, or any of its aliases. For now you may chose to use
189
301
  either style, but you cannot use both. Specifying an array for the command name is now considered deprecated.
190
302
 
@@ -283,7 +395,7 @@ Thank you to all of our contributors!
283
395
  - `Voice::Encoder#encode_file` now accepts options for ffmpeg ([#341](https://github.com/discordrb/discordrb/pull/341), thanks @oyisre)
284
396
  - Objects that implement `IDObject` can now be compared using more operators ([#346](https://github.com/discordrb/discordrb/pull/346), thanks @mattantonelli)
285
397
  - Filled in permissions bit for viewing a server's audit log ([#349](https://github.com/discordrb/discordrb/pull/349), thanks @Daniel-Worrall)
286
- - https://cdn.discordapp.com is now used as the base URL for CDN resources like avatars and server icons ([#358](https://github.com/discordrb/discordrb/pull/358))
398
+ - <https://cdn.discordapp.com> is now used as the base URL for CDN resources like avatars and server icons ([#358](https://github.com/discordrb/discordrb/pull/358))
287
399
  - Reaction events raised from the bot's actions will respect `parse_self` ([#350](https://github.com/discordrb/discordrb/pull/350), thanks @Daniel-Worrall)
288
400
  - `Webhooks::Embed#initialize` parses its `color`/`colour` argument ([#364](https://github.com/discordrb/discordrb/pull/364), thanks @Daniel-Worrall)
289
401
  - Webhook related events can now be matched on webhook ID ([#363](https://github.com/discordrb/discordrb/pull/363), thanks @Daniel-Worrall)
@@ -363,34 +475,41 @@ Thank you to all of our contributors!
363
475
  - `Attachment#initialize` correctly sets `@id` instance variable ([#575](https://github.com/discordrb/discordrb/pull/575), thanks @kandayo)
364
476
 
365
477
  ## [3.2.1] - 2017-02-18
478
+
366
479
  [3.2.1]: https://github.com/discordrb/discordrb/releases/tag/v3.2.1
367
480
 
368
481
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.0.1...v3.2.1)
369
482
 
370
483
  ### Changed
484
+
371
485
  - `Bot#stop` and `Gateway#stop` now explicitly return `nil`, for more convenient use in commands
372
486
  - The API method to query for users has been removed as the endpoint no longer exists
373
487
  - Some more methods have been changed to resolve IDs, which means they can be called with integer and string IDs instead of just the objects ([#313](https://github.com/discordrb/discordrb/pull/313), thanks @LikeLakers2)
374
488
  - Bulk deleting now uses the new non-deprecated URL – this has no immediate effect, but once the old one will be removed bots using it will not be able to bulk delete anymore (see also [#309](https://github.com/discordrb/discordrb/issues/309))
375
489
 
376
490
  ### Fixed
491
+
377
492
  - Fixed another bug with resumes that caused issues when resuming a zombie connection
378
493
  - Fixed a bug that caused issues when playing short files ([#326](https://github.com/discordrb/discordrb/issues/316))
379
494
 
380
495
  ## [3.2.0.1] - 2017-01-29
496
+
381
497
  [3.2.0.1]: https://github.com/discordrb/discordrb/releases/tag/v3.2.0.1
382
498
 
383
499
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.0...v3.2.0.1)
384
500
 
385
501
  ### Fixed
502
+
386
503
  - Attempt to fix an issue that causes a strange problem with dependencies when installing discordrb
387
504
 
388
505
  ## [3.2.0] - 2017-01-29
506
+
389
507
  [3.2.0]: https://github.com/discordrb/discordrb/releases/tag/v3.2.0
390
508
 
391
509
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.1.1...v3.2.0)
392
510
 
393
511
  ### Added
512
+
394
513
  - Various parts of gateway error handling were improved, leading to significant stability improvements:
395
514
  - A long standing bug was fixed that prevented resumes in most cases, which caused unnecessary reconnections.
396
515
  - The error handler that handles problems with sending the raw data over TCP now catches errors more broadly.
@@ -401,7 +520,7 @@ Thank you to all of our contributors!
401
520
  - Rich embeds can now be sent alongside messages, for example using the `embed` parameter in `send_message`, or with the new method `Channel#send_embed`
402
521
  - `advanced_functionality` bots now support escaping using backslashes ([#293](https://github.com/discordrb/discordrb/issues/293) / [#304](https://github.com/discordrb/discordrb/pull/304), thanks @LikeLakers2)
403
522
  - Added type checking and conversion for commands ([#298](https://github.com/discordrb/discordrb/pull/298), thanks @ohtaavi)
404
- - Bulk deleting messages now checks for message age (see also [discordapp/discord-api-docs#208](https://github.com/discordapp/discord-api-docs/issues/208)). By default, it will ignore messages that are too old to be bulk deleted, but there is also a `strict` mode setting now that raises an exception in such a case.
523
+ - Bulk deleting messages now checks for message age (see also [discord/discord-api-docs#208](https://github.com/discord/discord-api-docs/issues/208)). By default, it will ignore messages that are too old to be bulk deleted, but there is also a `strict` mode setting now that raises an exception in such a case.
405
524
  - Reactions can now be viewed for existing messages ([#262](https://github.com/discordrb/discordrb/pull/262), thanks @z64), added to messages ([#266](https://github.com/discordrb/discordrb/pull/266), thanks @z64), and listened for using gateway events as well as internal handlers ([#300](https://github.com/discordrb/discordrb/issues/300)).
406
525
  - Game types and stream URLs are now cached ([#297](https://github.com/discordrb/discordrb/issues/297))
407
526
  - The default non-streaming game was changed to be `0` instead of `nil` ([#277](https://github.com/discordrb/discordrb/pull/277), thanks @zeyla)
@@ -418,6 +537,7 @@ Thank you to all of our contributors!
418
537
  - `Server#role` now resolves IDs, so they can be passed as strings if necessary.
419
538
 
420
539
  ### Fixed
540
+
421
541
  - Fixed bots' shard settings being ignored in certain cases
422
542
  - Parsing role mentions using `Bot#parse_mention` works properly now.
423
543
  - Fixed some specific REST methods that were broken by the API module refactor ([#302](https://github.com/discordrb/discordrb/pull/302), thanks @LikeLakers2)
@@ -438,19 +558,23 @@ Thank you to all of our contributors!
438
558
  - Fixed a specific edge case in command chain handling where handling commands with the same name as the chain delimiter was broken
439
559
 
440
560
  ## [3.1.1] - 2016-10-21
561
+
441
562
  [3.1.1]: https://github.com/discordrb/discordrb/releases/tag/v3.1.1
442
563
 
443
564
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.1.0...v3.1.1)
444
565
 
445
566
  ### Fixed
567
+
446
568
  - An oversight where a `GUILD_DELETE` dispatch would cause an internal error was fixed. ([#256](https://github.com/discordrb/discordrb/pull/256), thanks @greenbigfrog)
447
569
 
448
570
  ## [3.1.0] - 2016-10-20
571
+
449
572
  [3.1.0]: https://github.com/discordrb/discordrb/releases/tag/v3.1.0
450
573
 
451
574
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.2...v3.1.0)
452
575
 
453
576
  ### Added
577
+
454
578
  - Emoji handling support ([#226](https://github.com/discordrb/discordrb/pull/226), thanks @greenbigfrog)
455
579
  - A `channels` attribute has been added to `CommandBot` as well as `Command` to restrict the channels in which either of the two works ([#249](https://github.com/discordrb/discordrb/pull/249), thanks @Xzanth)
456
580
  - The bulk deletion endpoint is now exposed directly using the `Channel#delete_messages` method ([#235](https://github.com/discordrb/discordrb/pull/235), thanks @z64)
@@ -459,6 +583,7 @@ Thank you to all of our contributors!
459
583
  - The specs have been improved; they're still not exhaustive by far but there are at least slightly more now.
460
584
 
461
585
  ### Fixed
586
+
462
587
  - Fixed an important bug that caused the logger not to work in some cases. ([#243](https://github.com/discordrb/discordrb/pull/243), thanks @Daniel-Worrall)
463
588
  - Fixed logger token redaction.
464
589
  - `unavailable_servers` should no longer crash the bot due to being nil in some cases ([#244](https://github.com/discordrb/discordrb/pull/244), thanks @Daniel-Worrall)
@@ -467,17 +592,21 @@ Thank you to all of our contributors!
467
592
  - Changing nicknames works again, it has apparently been broken in 3.0.0.
468
593
 
469
594
  ## [3.0.2] - 2016-10-07
595
+
470
596
  [3.0.2]: https://github.com/discordrb/discordrb/releases/tag/v3.0.2
471
597
 
472
598
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.1...v3.0.2)
473
599
 
474
600
  ### Changed
601
+
475
602
  - A small change to how CommandBot parameter lists are formatted ([#240](https://github.com/discordrb/discordrb/pull/240), thanks @FormalHellhound)
476
603
 
477
604
  ### Fixed
605
+
478
606
  - Setting properties on a channel (e.g. `Channel#topic=`) works again ([#238](https://github.com/discordrb/discordrb/issues/238) / [#239](https://github.com/discordrb/discordrb/pull/239), thanks @Daniel-Worrall)
479
607
 
480
608
  ## [3.0.1] - 2016-10-01
609
+
481
610
  [3.0.1]: https://github.com/discordrb/discordrb/releases/tag/v3.0.1
482
611
 
483
612
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.0...v3.0.1)
@@ -485,15 +614,18 @@ Thank you to all of our contributors!
485
614
  A tiny update to support webhook-sent messages properly!
486
615
 
487
616
  ### Added
617
+
488
618
  - Added the utility methods `Message#webhook?` and `User#webhook?` to check whether a message or a user belongs to a webhook
489
619
  - Added `Message#webhook_id` to get the ID of the sending webhook for webhook messages
490
620
  - Added the `webhook_commands` parameter to CommandBot that, if false (default true), prevents webhook-sent messages from being parsed and handled as commands.
491
621
 
492
622
  ### Fixed
623
+
493
624
  - Fixed webhook-sent messages being ignored because their author couldn't be resolved.
494
625
  - Fixed a minor performance problem where a CommandBot would create unnecessarily create redundant objects for every received message.
495
626
 
496
627
  ## [3.0.0] - 2016-09-30
628
+
497
629
  [3.0.0]: https://github.com/discordrb/discordrb/releases/tag/v3.0.0
498
630
 
499
631
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.3...v3.0.0)
@@ -503,9 +635,10 @@ I didn't think there could possibly be a release larger than 2.0.0 was, but here
503
635
  As with 2.0.0, there are some breaking changes! They are, as always, highlighted in bold.
504
636
 
505
637
  ### Added
638
+
506
639
  - **The `application_id` parameter has been renamed to `client_id`**. With the changes to how bot applications work, it would just be confusing to have it be called `application_id` any longer. If you try to use `application_id` now, it will raise a descriptive exception; with 3.1.0 that will be removed too (you'll get a less descriptive exception).
507
640
  - The gateway implementation has been completely rewritten, for more performance, stability and maintainability. This means that **to call some internal methods like `inject_reconnect`, a `Gateway` instance (available as `Bot#gateway`) now needs to be used.**
508
- - **User login using email and password has been removed**. Use a user token instead, see also [here](https://github.com/discordapp/discord-api-docs/issues/69#issuecomment-223886862).
641
+ - **User login using email and password has been removed**. Use a user token instead, see also [here](https://github.com/discord/discord-api-docs/issues/69#issuecomment-223886862).
509
642
  - In addition to the rewrite, the gateway version has also been upgraded to protocol version 6 (the rewrite was for v5). **With this, the way channel types are handled has been changed a bit!** If you've been using the abstraction methods like `Channel#voice?`, you should be fine though. This also includes support for group chats on user accounts, as that was the only real functionality change on v6. ([#211](https://github.com/discordrb/discordrb/pull/211), thanks @Daniel-Worrall)
510
643
  - **Custom prefix handlers for `CommandBot`s now get the full message object as their parameter rather than only the content**, for even more flexibility.
511
644
  - For internal consistency, **the `UnknownGuild` error was renamed to `UnknownServer`**. I doubt this change affects anyone, but if you handle that error specifically in your bot, make sure to change it.
@@ -547,13 +680,14 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
547
680
  - A method `Bot#connected?` has been added to check whether the bot is currently connected to the gateway.
548
681
  - The indescriptive error message that was previously sent when calling methods like `Bot#game=` without an active gateway connection has been replaced with a more descriptive one.
549
682
  - The bot's token is now, by default, redacted from any logging output; this can be turned off if desired using the `redact_token` initialization parameter. ([#225](https://github.com/discordrb/discordrb/issues/225) / [#231](https://github.com/discordrb/discordrb/pull/231), thanks @Daniel-Worrall)
550
- - The new rate limit headers are now supported. This will have no real impact on any code using discordrb, but it means discordrb is now considered compliant again. See also [here](https://github.com/discordapp/discord-api-docs/issues/108).
683
+ - The new rate limit headers are now supported. This will have no real impact on any code using discordrb, but it means discordrb is now considered compliant again. See also [here](https://github.com/discord/discord-api-docs/issues/108).
551
684
  - Rogue presences, i.e. presences without an associated cached member, now print a log message instead of being completely ignored
552
685
  - A variety of aliases have been added to existing methods.
553
686
  - An example to show off voice sending has been added to the repo, and existing examples have been improved.
554
687
  - A large amount of fixes and clarifications have been made to the docs.
555
688
 
556
689
  ### Fixed
690
+
557
691
  - The almost a year old bug where changing the own user's username would reset its avatar has finally been fixed.
558
692
  - The issue where resolving a large server with the owner offline would sometimes cause a stack overflow has been fixed ([#169](https://github.com/discordrb/discordrb/issues/169) / [#170](https://github.com/discordrb/discordrb/issues/170) / [#191](https://github.com/discordrb/discordrb/pull/191), thanks @stoodfarback)
559
693
  - Fixed an issue where if a server had an AFK channel set, but that AFK channel couldn't be connected to, resolving the server (and in turn all objects depending on it) would fail. This likely fixes any random `NoPermission` errors you've ever encountered in your log.
@@ -573,26 +707,31 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
573
707
  - A possible regression in PM channel creation was fixed. ([#227](https://github.com/discordrb/discordrb/issues/227) / [#228](https://github.com/discordrb/discordrb/pull/228), thanks @heimidal)
574
708
 
575
709
  ## [2.1.3] - 2016-06-11
710
+
576
711
  [2.1.3]: https://github.com/discordrb/discordrb/releases/tag/v2.1.3
577
712
 
578
713
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.2...v2.1.3)
579
714
 
580
715
  ### Fixed
716
+
581
717
  - Various messages that were just printed to stdout that should have been using the `Logger` system now do ([#132](https://github.com/discordrb/discordrb/issues/132) and [#133](https://github.com/discordrb/discordrb/pull/133), thanks @PoVa)
582
718
  - A mistake in the documentation was fixed ([#140](https://github.com/discordrb/discordrb/issues/140))
583
719
  - Handling of the `GUILD_MEMBER_DELETE` gateway event should now work even if, for whatever reason, Discord sends an invalid server ID ([#129](https://github.com/discordrb/discordrb/issues/129))
584
720
  - If the processing of a particular voice packet takes too long, the user will now be warned instead of an error being raised ([#134](https://github.com/discordrb/discordrb/issues/134))
585
721
 
586
722
  ## [2.1.2] - 2016-05-29
723
+
587
724
  [2.1.2]: https://github.com/discordrb/discordrb/releases/tag/v2.1.2
588
725
 
589
726
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.1...v2.1.2)
590
727
 
591
728
  ### Added
729
+
592
730
  - A reader was added (`Bot#awaits`) to read the hash of awaits, so ones that aren't necessary anymore can be deleted.
593
731
  - `Channel#prune` now uses the bulk delete endpoint which means it will be much faster and no longer rate limited ([#118](https://github.com/discordrb/discordrb/pull/118), thanks @snapcase)
594
732
 
595
733
  ### Fixed
734
+
596
735
  - A few unresolved links in the documentation were fixed.
597
736
  - The tracking of streamed servers was updated so that very long lists of servers should now all be processed.
598
737
  - Resolution methods now return nil if the object to resolve can't be found, which should alleviate some rare caching problems ([#124](https://github.com/discordrb/discordrb/pull/124), thanks @Snazzah)
@@ -601,20 +740,24 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
601
740
  - Uncached members in messages are now logged.
602
741
 
603
742
  ## [2.1.1] - 2016-05-08
743
+
604
744
  [2.1.1]: https://github.com/discordrb/discordrb/releases/tag/v2.1.1
605
745
 
606
746
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.0...v2.1.1)
607
747
 
608
748
  ### Fixed
749
+
609
750
  - Fixed a caching error that occurred when deleting roles ([#113](https://github.com/discordrb/discordrb/issues/113))
610
751
  - Commands should no longer be triggered with nil authors ([#114](https://github.com/discordrb/discordrb/issues/114))
611
752
 
612
753
  ## [2.1.0] - 2016-04-30
754
+
613
755
  [2.1.0]: https://github.com/discordrb/discordrb/releases/tag/v2.1.0
614
756
 
615
757
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.4...v2.1.0)
616
758
 
617
759
  ### Added
760
+
618
761
  - API support for the April 29 Discord update, which was the first feature update in a while with more than a few additions to the API, was added. This includes: ([#111](https://github.com/discordrb/discordrb/pull/111))
619
762
  - Members' nicknames can now be set and read (`Member#nick`) and updates to them are being tracked.
620
763
  - Roles now have a `mentionable?` property and a `mention` utility method.
@@ -622,20 +765,23 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
622
765
  - The internal REST rate limit handler was updated:
623
766
  - It now tracks message rate limits server wide to properly handle new bot account rate limits. ([#100](https://github.com/discordrb/discordrb/issues/100))
624
767
  - It now keeps track of all requests, even those that are known not to be rate limited (it just won't do anything to them). This allows for more flexibility should future rate limits be added.
625
- - Guild sharding is now supported using the optional `shard_id` and `num_shards` to bot initializers. Read about it here: https://github.com/discordapp/discord-api-docs/issues/17 ([#98](https://github.com/discordrb/discordrb/issues/98))
768
+ - Guild sharding is now supported using the optional `shard_id` and `num_shards` to bot initializers. Read about it here: <https://github.com/discord/discord-api-docs/issues/17> ([#98](https://github.com/discordrb/discordrb/issues/98))
626
769
  - Commands can now require users to have specific action permissions to be able to execute them using the `:required_permissions` attribute. ([#104](https://github.com/discordrb/discordrb/issues/104) / [#112](https://github.com/discordrb/discordrb/pull/112))
627
770
  - A `heartbeat` event was added that gets triggered every now and then to allow for roughly periodic actions. ([#110](https://github.com/discordrb/discordrb/pull/110))
628
771
  - Prefixes are now more flexible in the format they can have - arrays and callables are now allowed as well. Read the documentation for more info.([#107](https://github.com/discordrb/discordrb/issues/107) / [#109](https://github.com/discordrb/discordrb/pull/109))
629
772
 
630
773
  ## [2.0.4] - 2016-04-19
774
+
631
775
  [2.0.4]: https://github.com/discordrb/discordrb/releases/tag/v2.0.4
632
776
 
633
777
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.3...v2.0.4)
634
778
 
635
779
  ### Added
780
+
636
781
  - Added a utility method `Invite#url` ([#86](https://github.com/discordrb/discordrb/issues/86)/[#101](https://github.com/discordrb/discordrb/pull/101), thanks @PoVa)
637
782
 
638
783
  ### Fixed
784
+
639
785
  - Fix a caching inconsistency where a server's channels and a bot's channels wouldn't be identical. This caused server channels to not update properly ([#105](https://github.com/discordrb/discordrb/issues/105))
640
786
  - Setting avatars should now work again on Windows ([#96](https://github.com/discordrb/discordrb/issues/96))
641
787
  - Message edit events should no longer be raised with nil authors ([#95](https://github.com/discordrb/discordrb/issues/95))
@@ -644,27 +790,32 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
644
790
  - Fixed some possible problems with heartbeats not being sent with unstable connections
645
791
 
646
792
  ## [2.0.3] - 2016-04-15
793
+
647
794
  [2.0.3]: https://github.com/discordrb/discordrb/releases/tag/v2.0.3
648
795
 
649
796
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.2...v2.0.3)
650
797
 
651
798
  ### Added
799
+
652
800
  - All examples now fully use v2 ([#92](https://github.com/discordrb/discordrb/pull/92), thanks @snapcase)
653
801
  - The message that occurs when a command is missing permission can now be changed or disabled ([#94](https://github.com/discordrb/discordrb/pull/94), thanks @snapcase)
654
802
  - The log message that occurs when you disconnect from the WebSocket is now more compact ([#90](https://github.com/discordrb/discordrb/issues/90))
655
803
  - `Bot#ignored?` now exists to check whether a user is ignored
656
804
 
657
805
  ### Fixed
806
+
658
807
  - A problem where getting channel history would sometimes cause an exception has been fixed ([#88](https://github.com/discordrb/discordrb/issues/88))
659
808
  - `split_message` should now behave correctly in a specific edge case ([#85](https://github.com/discordrb/discordrb/pull/85), thanks @AnhNhan)
660
809
  - DCA playback should no longer cause an error when playback ends due to a specific reason
661
810
 
662
811
  ## [2.0.2] - 2016-04-10
812
+
663
813
  [2.0.2]: https://github.com/discordrb/discordrb/releases/tag/v2.0.2
664
814
 
665
815
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.1...v2.0.2)
666
816
 
667
817
  ### Added
818
+
668
819
  - Added `Server#text_channels` and `#voice_channels` ([#79](https://github.com/discordrb/discordrb/issues/79))
669
820
  - Added `Server#online_users` ([#80](https://github.com/discordrb/discordrb/issues/80))
670
821
  - Added `Member#role?` ([#83](https://github.com/discordrb/discordrb/issues/83))
@@ -672,6 +823,7 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
672
823
  - `Bot#send_message` can now take channel objects as well as the ID
673
824
 
674
825
  ### Fixed
826
+
675
827
  - Removing the bot from a server will no longer result in a gateway message error
676
828
  - Fixed an exception raised if a previously unavailable guild goes online after the stream timeout
677
829
  - `server_create` will no longer be raised for newly available guilds
@@ -679,62 +831,72 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
679
831
  - Fixed an error where rarely a server's owner wouldn't be initialized correctly
680
832
 
681
833
  ## [2.0.1] - 2016-04-10
834
+
682
835
  [2.0.1]: https://github.com/discordrb/discordrb/releases/tag/v2.0.1
683
836
 
684
837
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.0...v2.0.1)
685
838
 
686
839
  ### Added
840
+
687
841
  - Added some more examples ([#75](https://github.com/discordrb/discordrb/pull/75), thanks @greenbigfrog)
688
842
  - Users can now be ignored from messages at gateway level (`Bot#ignore_user`, `Bot#unignore_user`)
689
843
  - `Member#add_role` and `Member#remove_role` were re-added from User - they were missing before
690
844
 
691
845
  ### Fixed
846
+
692
847
  - Fixed some typos in the documentation
693
848
  - If a server is actually unavailable it will no longer spam the console with timeout messages
694
849
  - VoiceBot now sends five frames of silence after finishing a track. This fixes an issue where the sound from the last track would bleed over into the new one due to interpolation.
695
850
  - Fixed a bug where playing something right after connecting to voice would sometimes cause the encryption key to not be set
696
851
 
697
852
  ## [2.0.0] - 2016-04-08
853
+
698
854
  [2.0.0]: https://github.com/discordrb/discordrb/releases/tag/v2.0.0
699
855
 
700
856
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.8.1...v2.0.0)
701
857
 
702
858
  ### Added
859
+
703
860
  This is the first major update with some breaking changes! Those are highlighted in bold with migration advice after them. Ask in the Discord channel (see the README) if you have questions.
704
861
 
705
862
  - **Bot initializers now only use named parameters.** This shouldn't be a hard change to adjust to, but everyone will have to do it. Here's some examples:
706
- ```rb
707
- # Previously
708
- bot = Discordrb::Bot.new 'email@example.com', 'hunter2', true
709
-
710
- # Now
711
- bot = Discordrb::Bot.new email: 'email@example.com', password: 'hunter2', log_mode: :debug
712
- ```
713
- ```rb
714
- # Previously
715
- bot = Discordrb::Bot.new :token, 'TOKEN HERE'
716
-
717
- # Now
718
- bot = Discordrb::Bot.new token: 'TOKEN HERE', application_id: 163456789123456789
719
- ```
720
- ```rb
721
- # Previously
722
- bot = Discordrb::Commands::CommandBot.new :token, 'TOKEN HERE', '!', nil, {advanced_functionality: false}
723
-
724
- # Now
725
- bot = Discordrb::Commands::CommandBot.new token: 'TOKEN HERE', application_id: 163456789123456789, prefix: '!', advanced_functionality: false
726
- ```
727
- - Connecting to multiple voice channels at once (only available with bot accounts) is now supported. **This means `bot.voice` now takes the server ID as the parameter**. For a seamless switch, the utility method `MessageEvent#voice` was added - simply replace `bot.voice` with `event.voice` in all instances.
728
- - **The `Member` and `Recipient` classes were split off from `User`**. Members are users on servers and recipients are partners in private messages. Since both are delegates to `User`, most things will work as before, but most notably roles were changed to no longer be by ID (for example, instead of `event.author.roles(event.server.id)`, you'd just use `event.author.roles` instead).
729
- - **All previously deprecated methods were removed.** This includes:
730
- - `Server#afk_channel_id=` (use `afk_channel=`, it works with the ID too)
731
- - `Channel#is_private` (use `private?` instead, it's more reliable with edge cases like Twitch subscriber-only channels)
732
- - `Bot#find` (use `find_channel` instead, it does the exact same thing without confusion with `find_user`)
733
- - **`Server` is now used instead of `Guild` in all external methods and classes.** Previously, all the events regarding roles and such were called `GuildRoleXYZEvent`, now they're all called `ServerRoleXYZEvent` for consistency with other attributes and methods.
734
- - **`advanced_functionality` is now disabled by default.** If you absolutely need it, you can easily re-enable it by just setting that parameter in the CommandBot initializer, but for most people that didn't need it this will fix some bugs with mentions in commands and such.
735
- - **`User#bot?` was renamed to `User#current_bot?`** with the addition of the `User#bot_account?` reader to check for bot account-ness (the "BOT" tag visible on Discord)
736
- - Member chunks will no longer automatically be requested on startup, but rather once they're actually needed (`event.server.members`). This is both a performance change (much faster startup for large bots especially) and an important API compliance one - this is what the Discord devs have requested.
737
- - Initial support for bots that have no WebSocket connection was started. This is useful for web apps that need to get information on something without having to run something in the background all the time. A tutorial on these will be coming soon, in the meantime, use this short example:
863
+
864
+ ```rb
865
+ # Previously
866
+ bot = Discordrb::Bot.new 'email@example.com', 'hunter2', true
867
+
868
+ # Now
869
+ bot = Discordrb::Bot.new email: 'email@example.com', password: 'hunter2', log_mode: :debug
870
+ ```
871
+
872
+ ```rb
873
+ # Previously
874
+ bot = Discordrb::Bot.new :token, 'TOKEN HERE'
875
+
876
+ # Now
877
+ bot = Discordrb::Bot.new token: 'TOKEN HERE', application_id: 163456789123456789
878
+ ```
879
+
880
+ ```rb
881
+ # Previously
882
+ bot = Discordrb::Commands::CommandBot.new :token, 'TOKEN HERE', '!', nil, {advanced_functionality: false}
883
+
884
+ # Now
885
+ bot = Discordrb::Commands::CommandBot.new token: 'TOKEN HERE', application_id: 163456789123456789, prefix: '!', advanced_functionality: false
886
+ ```
887
+
888
+ - Connecting to multiple voice channels at once (only available with bot accounts) is now supported. **This means `bot.voice` now takes the server ID as the parameter**. For a seamless switch, the utility method `MessageEvent#voice` was added - simply replace `bot.voice` with `event.voice` in all instances.
889
+ - **The `Member` and `Recipient` classes were split off from `User`**. Members are users on servers and recipients are partners in private messages. Since both are delegates to `User`, most things will work as before, but most notably roles were changed to no longer be by ID (for example, instead of `event.author.roles(event.server.id)`, you'd just use `event.author.roles` instead).
890
+ - **All previously deprecated methods were removed.** This includes:
891
+ - `Server#afk_channel_id=` (use `afk_channel=`, it works with the ID too)
892
+ - `Channel#is_private` (use `private?` instead, it's more reliable with edge cases like Twitch subscriber-only channels)
893
+ - `Bot#find` (use `find_channel` instead, it does the exact same thing without confusion with `find_user`)
894
+ - **`Server` is now used instead of `Guild` in all external methods and classes.** Previously, all the events regarding roles and such were called `GuildRoleXYZEvent`, now they're all called `ServerRoleXYZEvent` for consistency with other attributes and methods.
895
+ - **`advanced_functionality` is now disabled by default.** If you absolutely need it, you can easily re-enable it by just setting that parameter in the CommandBot initializer, but for most people that didn't need it this will fix some bugs with mentions in commands and such.
896
+ - **`User#bot?` was renamed to `User#current_bot?`** with the addition of the `User#bot_account?` reader to check for bot account-ness (the "BOT" tag visible on Discord)
897
+ - Member chunks will no longer automatically be requested on startup, but rather once they're actually needed (`event.server.members`). This is both a performance change (much faster startup for large bots especially) and an important API compliance one - this is what the Discord devs have requested.
898
+ - Initial support for bots that have no WebSocket connection was started. This is useful for web apps that need to get information on something without having to run something in the background all the time. A tutorial on these will be coming soon, in the meantime, use this short example:
899
+
738
900
  ```rb
739
901
  require 'discordrb'
740
902
  require 'discordrb/light'
@@ -742,31 +904,33 @@ require 'discordrb/light'
742
904
  bot = Discordrb::Light::LightBot.new 'token here'
743
905
  puts bot.profile.username
744
906
  ```
745
- - OAuth bot accounts are now better supported using a method `Bot#invite_url` to get a bot's invite URL and sending tokens using the new `Bot` prefix.
746
- - discordrb now fully uses [websocket-client-simple](https://github.com/shokai/websocket-client-simple) (a.k.a. WSCS) instead of Faye::WebSocket, this means that the annoying OpenSSL library thing won't have to be done anymore.
747
- - The new version of the Discord gateway (v4) is supported and used by default. This should bring more stability and possibly slight performance improvements.
748
- - Some older v3 features that weren't supported before are now:
749
- - Compressed ready packets (should decrease network overhead for very large bots)
750
- - Discord rate limits are now supported better - the client will never send a message if it knows it's going to be rate limited, instead it's going to wait for the correct time.
751
- - Requests will now automatically be retried if a 502 (cloudflare error) is received.
752
- - `MessageEditEvent`s now have a whole message instead of just the ID to allow for checking the content of edited messages.
753
- - `Message`s now have an `attachments` array with files attached to the message.
754
- - `ReadyEvent` and `DisconnectEvent` now have the bot as a readable attribute - useful for container-based bots that don't have a way to get them otherwise.
755
- - `Bot#find_channel` can now parse channel mentions and search for specific types of channels (text or voice).
756
- - `Server#create_channel` can now create voice channels.
757
- - A utility function `User#distinct` was added to get the distinct representation of a user (i.e. name + discrim, for example "meew0#9811")
758
- - The `User#discriminator` attribute now has more aliases (`#tag`, `#discord_tag`, `#discrim`)
759
- - `Permission` objects can now be created or set even without a role writer, useful to quickly get byte representations of permissions
760
- - Permission overwrites can now be defined more easily using the utility method `Channel#define_overwrite`
761
- - `Message`s returned at the end of commands (for example using `User#pm` or `Message#edit`) will now no longer be sent ([#66](https://github.com/discordrb/discordrb/issues/66))
762
- - The `:with_text` event attribute is now aliased to `:exact_text` ([#65](https://github.com/discordrb/discordrb/issues/65))
763
- - Server icons (`Server#icon=`) can now be set just like avatars (`Profile#avatar=`)
764
- - Lots of comments were added to the examples and some bugs fixed
765
- - The overall performance and memory usage was improved, especially on Ruby 2.3 (using the new frozen string literal comment)
766
- - The documentation was slightly improved.
907
+
908
+ - OAuth bot accounts are now better supported using a method `Bot#invite_url` to get a bot's invite URL and sending tokens using the new `Bot` prefix.
909
+ - discordrb now fully uses [websocket-client-simple](https://github.com/shokai/websocket-client-simple) (a.k.a. WSCS) instead of Faye::WebSocket, this means that the annoying OpenSSL library thing won't have to be done anymore.
910
+ - The new version of the Discord gateway (v4) is supported and used by default. This should bring more stability and possibly slight performance improvements.
911
+ - Some older v3 features that weren't supported before are now:
912
+ - Compressed ready packets (should decrease network overhead for very large bots)
913
+ - Discord rate limits are now supported better - the client will never send a message if it knows it's going to be rate limited, instead it's going to wait for the correct time.
914
+ - Requests will now automatically be retried if a 502 (cloudflare error) is received.
915
+ - `MessageEditEvent`s now have a whole message instead of just the ID to allow for checking the content of edited messages.
916
+ - `Message`s now have an `attachments` array with files attached to the message.
917
+ - `ReadyEvent` and `DisconnectEvent` now have the bot as a readable attribute - useful for container-based bots that don't have a way to get them otherwise.
918
+ - `Bot#find_channel` can now parse channel mentions and search for specific types of channels (text or voice).
919
+ - `Server#create_channel` can now create voice channels.
920
+ - A utility function `User#distinct` was added to get the distinct representation of a user (i.e. name + discrim, for example "meew0#9811")
921
+ - The `User#discriminator` attribute now has more aliases (`#tag`, `#discord_tag`, `#discrim`)
922
+ - `Permission` objects can now be created or set even without a role writer, useful to quickly get byte representations of permissions
923
+ - Permission overwrites can now be defined more easily using the utility method `Channel#define_overwrite`
924
+ - `Message`s returned at the end of commands (for example using `User#pm` or `Message#edit`) will now no longer be sent ([#66](https://github.com/discordrb/discordrb/issues/66))
925
+ - The `:with_text` event attribute is now aliased to `:exact_text` ([#65](https://github.com/discordrb/discordrb/issues/65))
926
+ - Server icons (`Server#icon=`) can now be set just like avatars (`Profile#avatar=`)
927
+ - Lots of comments were added to the examples and some bugs fixed
928
+ - The overall performance and memory usage was improved, especially on Ruby 2.3 (using the new frozen string literal comment)
929
+ - The documentation was slightly improved.
767
930
 
768
931
  ### Fixed
769
- - A *lot* of latent bugs with caching were fixed. This doesn't really have a noticeable effect, it just means better stability and reliability as a whole.
932
+
933
+ - A _lot_ of latent bugs with caching were fixed. This doesn't really have a noticeable effect, it just means better stability and reliability as a whole.
770
934
  - **Command bots no longer respond when there are spaces between the prefix and the command.** Because this behaviour may be desirable, a `spaces_allowed` attribute was added to the CommandBot initializer that can be set to true to re-enable this behaviour.
771
935
  - Permission calculation (`User#permission?`) has been thoroughly rewritten and should now account for edge cases like server owners and Manage Permissions.
772
936
  - The gateway reconnect logic now uses a correct falloff system - before it would start at 1 second between attempts and immediately jump to 120. Now the transition is more smooth.
@@ -776,456 +940,552 @@ puts bot.profile.username
776
940
  - Command bots now obey `should_parse_self`
777
941
 
778
942
  ## [1.8.1] - 2016-03-11
943
+
779
944
  [1.8.1]: https://github.com/discordrb/discordrb/releases/tag/v1.8.1
780
945
 
781
946
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.8.0...v1.8.1)
782
947
 
783
948
  ### Fixed
784
- * Fixed an error (caused by an undocumented API change) that would write a traceback to the console every time someone started typing in a channel invisible to the bot.
949
+
950
+ - Fixed an error (caused by an undocumented API change) that would write a traceback to the console every time someone started typing in a channel invisible to the bot.
785
951
 
786
952
  ## [1.8.0] - 2016-03-11
953
+
787
954
  [1.8.0]: https://github.com/discordrb/discordrb/releases/tag/v1.8.0
788
955
 
789
956
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.5...v1.8.0)
790
957
 
791
958
  ### Added
792
- * The built-in logger has been somewhat redone.
793
- * It now has a fancy mode, settable using `Discordrb::LOGGER.fancy = true/false`, that makes use of ANSI escape codes to prettify the log output.
794
- * It now supports more things than just `debug`, there's also `warn`, `error`, `good`, `info`, `in`, and `out`.
795
- * You now have finer control over what gets output, using `Discordrb::LOGGER.mode=` which accepts one of `:debug`, `:verbose`, `:normal`, `:quiet`, `:silent`.
796
- * You can now log in with just a token by setting the email parameter to `:token` and the password to the token you want to log in with.
797
- * DCA playback now supports `DCA1`.
798
- * All data classes (now generalized using the `IDObject` mixin) have a `creation_date` parameter that specifies when the object was created.
799
- * `Channel#mention` was added that mentions a channel analogous to `User#mention`.
800
- * The aliases `tag` and `discord_tag` have been added to the discriminator because that's what Discord calls them now.
959
+
960
+ - The built-in logger has been somewhat redone.
961
+ - It now has a fancy mode, settable using `Discordrb::LOGGER.fancy = true/false`, that makes use of ANSI escape codes to prettify the log output.
962
+ - It now supports more things than just `debug`, there's also `warn`, `error`, `good`, `info`, `in`, and `out`.
963
+ - You now have finer control over what gets output, using `Discordrb::LOGGER.mode=` which accepts one of `:debug`, `:verbose`, `:normal`, `:quiet`, `:silent`.
964
+ - You can now log in with just a token by setting the email parameter to `:token` and the password to the token you want to log in with.
965
+ - DCA playback now supports `DCA1`.
966
+ - All data classes (now generalized using the `IDObject` mixin) have a `creation_date` parameter that specifies when the object was created.
967
+ - `Channel#mention` was added that mentions a channel analogous to `User#mention`.
968
+ - The aliases `tag` and `discord_tag` have been added to the discriminator because that's what Discord calls them now.
801
969
 
802
970
  ### Fixed
803
- * A problem some users had where voice playback would leak FFmpeg processes has been fixed.
804
- * The VWS internal thread now has a name in debug messages (`vws-i`)
805
- * Users' voice channels should now always be set if they are in one
971
+
972
+ - A problem some users had where voice playback would leak FFmpeg processes has been fixed.
973
+ - The VWS internal thread now has a name in debug messages (`vws-i`)
974
+ - Users' voice channels should now always be set if they are in one
806
975
 
807
976
  ## [1.7.5] - 2016-03-03
977
+
808
978
  [1.7.5]: https://github.com/discordrb/discordrb/releases/tag/v1.7.5
809
979
 
810
980
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.4...v1.7.5)
811
981
 
812
982
  ### Changed
813
- * `Channel#send_message` and `Bot#send_message` now have an extra `tts` parameter (false by default) to specify whether the message should use TTS.
983
+
984
+ - `Channel#send_message` and `Bot#send_message` now have an extra `tts` parameter (false by default) to specify whether the message should use TTS.
814
985
 
815
986
  ### Fixed
816
- * Attempting to `p` a data class, especially a `User` or `Profile`, should no longer lock up the interpreter due to very deep recursion.
817
- * Manual TTS using `API.send_message` will now work correctly.
987
+
988
+ - Attempting to `p` a data class, especially a `User` or `Profile`, should no longer lock up the interpreter due to very deep recursion.
989
+ - Manual TTS using `API.send_message` will now work correctly.
818
990
 
819
991
  ## [1.7.4] - 2016-02-28
992
+
820
993
  [1.7.4]: https://github.com/discordrb/discordrb/releases/tag/v1.7.4
821
994
 
822
995
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.3...v1.7.4)
823
996
 
824
997
  ### Added
825
- * Added methods `Channel#text?` and `Channel#voice?` to check a channel's type.
826
- * Frequently allocated strings have been turned into symbols or frozen constants, this should improve performance slightly.
998
+
999
+ - Added methods `Channel#text?` and `Channel#voice?` to check a channel's type.
1000
+ - Frequently allocated strings have been turned into symbols or frozen constants, this should improve performance slightly.
827
1001
 
828
1002
  ### Fixed
829
- * `VoiceBot#destroy` will now properly disconnect you and should no longer cause segfaults.
830
- * Fixed a bug where you couldn't set any settings on a role created using `Server#create_role`.
831
- * Fixed `Profile#avatar=` doing absolutely nothing.
1003
+
1004
+ - `VoiceBot#destroy` will now properly disconnect you and should no longer cause segfaults.
1005
+ - Fixed a bug where you couldn't set any settings on a role created using `Server#create_role`.
1006
+ - Fixed `Profile#avatar=` doing absolutely nothing.
832
1007
 
833
1008
  ## [1.7.3] - 2016-02-27
1009
+
834
1010
  [1.7.3]: https://github.com/discordrb/discordrb/releases/tag/v1.7.3
835
1011
 
836
1012
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.2...v1.7.3)
837
1013
 
838
1014
  ### Added
839
- * The server banlist can now be accessed more nicely using `Server#bans`.
840
- * Some abstractions for OAuth application creation were added - `bot.create_oauth_application` and `bot.update_oauth_application`. See the docs about how to use them.
1015
+
1016
+ - The server banlist can now be accessed more nicely using `Server#bans`.
1017
+ - Some abstractions for OAuth application creation were added - `bot.create_oauth_application` and `bot.update_oauth_application`. See the docs about how to use them.
841
1018
 
842
1019
  ## [1.7.2] - 2016-02-25
1020
+
843
1021
  [1.7.2]: https://github.com/discordrb/discordrb/releases/tag/v1.7.2
844
1022
 
845
1023
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.1...v1.7.2)
846
1024
 
847
1025
  ### Changed
848
- * The `bot` object can now be read from all events, not just from command ones.
849
- * You can now set the `filter_volume` on VoiceBot, which corresponds to the old way of doing volume handling, in case the new way is too slow for you.
1026
+
1027
+ - The `bot` object can now be read from all events, not just from command ones.
1028
+ - You can now set the `filter_volume` on VoiceBot, which corresponds to the old way of doing volume handling, in case the new way is too slow for you.
850
1029
 
851
1030
  ## [1.7.1] - 2016-02-23
1031
+
852
1032
  [1.7.1]: https://github.com/discordrb/discordrb/releases/tag/v1.7.1
853
1033
 
854
1034
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.0...v1.7.1)
855
1035
 
856
1036
  ### Added
857
- * A `clear!` method was added to EventContainer that removes all events from it, so you can overwrite modules by defining them again. (It's unnecessary for CommandContainers because commands can never be duplicate.)
1037
+
1038
+ - A `clear!` method was added to EventContainer that removes all events from it, so you can overwrite modules by defining them again. (It's unnecessary for CommandContainers because commands can never be duplicate.)
858
1039
 
859
1040
  ### Fixed
860
- * The tokens will now be verified correctly when obtained from the cache. (I messed up last time)
861
- * Events of the same type in different containers will now be merged correctly when including both containers.
862
- * Got rid of the annoying `undefined method 'game' for nil:NilClass` error that sometimes occurred on startup. (It was harmless but now it's gone entirely)
1041
+
1042
+ - The tokens will now be verified correctly when obtained from the cache. (I messed up last time)
1043
+ - Events of the same type in different containers will now be merged correctly when including both containers.
1044
+ - Got rid of the annoying `undefined method 'game' for nil:NilClass` error that sometimes occurred on startup. (It was harmless but now it's gone entirely)
863
1045
 
864
1046
  ## [1.7.0] - 2016-02-23
1047
+
865
1048
  [1.7.0]: https://github.com/discordrb/discordrb/releases/tag/v1.7.0
866
1049
 
867
1050
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.6...v1.7.0)
868
1051
 
869
1052
  ### Added
870
- * **`bot.find` and `bot.find_user` have had their fuzzy search feature removed because it only caused problems. If you still need it, you can copy the code from the repo's history.** In addition, `find` was renamed to `find_channel` but still exists as a (deprecated) alias.
871
- * The in-line documentation using Yard is now complete and can be [accessed at RubyDoc](https://www.rubydoc.info/github/discordrb/discordrb/master/). It's not quite polished yet and some things may be confusing, but it should be mostly usable.
872
- * Events and commands can now be thoroughly modularized using a system I call 'containers'. (TODO: Add a tutorial here later)
873
- * Support for the latest API changes:
874
- * `Server.leave` does something different than `Server.delete`
875
- * The WebSocket connection now uses version 3 of the protocol
876
- * Voice bots now support playing DCA files using the [`play_dca`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FVoice%2FVoiceBot%3Aplay_dca) method. (TODO: Add a section to the voice tutorial)
877
- * The [volume](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FVoice%2FVoiceBot%3Avolume) of a voice bot can now be changed during playback and not only for future playbacks.
878
- * A `Channel.prune` method was added to quickly delete lots of messages from a channel. (It appears that this is something lots of bots do.)
879
- * [`Server#members`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Amembers) is now aliased to `users`.
880
- * An attribute [`Server#member_count`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Amember_count) was added that is accurate even if chunked members have not been added yet.
881
- * An attribute [`Server#large?`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Alarge) was added that is true if a server could possibly have an inaccurate list of members.
882
- * Some more specific error classes have been added to replace the RestClient generic ones.
883
- * Quickly sending a message using the `event << 'text'` syntax now works in every type of message event, not just commands.
884
- * You can now set the bitrate of sent audio data using `bot.voice.encoder.bitrate = 64000` (see [`Encoder#bitrate=`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb/Voice/Encoder#bitrate%3D-instance_method)). Note that sent audio data will always be unaffected by voice channel bitrate settings, those only tell the client at what bitrate it should send.
885
- * A rate limiting feature was added to commands - you can define buckets using the [`bucket`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FCommands%2FRateLimiter%3Abucket) method and use them as a parameter for [`command`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FCommands%2FCommandContainer%3Acommand).
886
- * A [`SimpleRateLimiter`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb/Commands/SimpleRateLimiter) class was also added if you want rate limiting independent from commands (e. g. for events)
887
- * Connecting to the WebSocket now uses an exponential falloff system so we don't spam Discord with requests anymore.
888
- * Debug timestamps are now accurate to milliseconds.
1053
+
1054
+ - **`bot.find` and `bot.find_user` have had their fuzzy search feature removed because it only caused problems. If you still need it, you can copy the code from the repo's history.** In addition, `find` was renamed to `find_channel` but still exists as a (deprecated) alias.
1055
+ - The in-line documentation using Yard is now complete and can be [accessed at RubyDoc](https://www.rubydoc.info/github/discordrb/discordrb/master/). It's not quite polished yet and some things may be confusing, but it should be mostly usable.
1056
+ - Events and commands can now be thoroughly modularized using a system I call 'containers'. (TODO: Add a tutorial here later)
1057
+ - Support for the latest API changes:
1058
+ - `Server.leave` does something different than `Server.delete`
1059
+ - The WebSocket connection now uses version 3 of the protocol
1060
+ - Voice bots now support playing DCA files using the [`play_dca`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FVoice%2FVoiceBot%3Aplay_dca) method. (TODO: Add a section to the voice tutorial)
1061
+ - The [volume](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FVoice%2FVoiceBot%3Avolume) of a voice bot can now be changed during playback and not only for future playbacks.
1062
+ - A `Channel.prune` method was added to quickly delete lots of messages from a channel. (It appears that this is something lots of bots do.)
1063
+ - [`Server#members`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Amembers) is now aliased to `users`.
1064
+ - An attribute [`Server#member_count`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Amember_count) was added that is accurate even if chunked members have not been added yet.
1065
+ - An attribute [`Server#large?`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Alarge) was added that is true if a server could possibly have an inaccurate list of members.
1066
+ - Some more specific error classes have been added to replace the RestClient generic ones.
1067
+ - Quickly sending a message using the `event << 'text'` syntax now works in every type of message event, not just commands.
1068
+ - You can now set the bitrate of sent audio data using `bot.voice.encoder.bitrate = 64000` (see [`Encoder#bitrate=`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb/Voice/Encoder#bitrate%3D-instance_method)). Note that sent audio data will always be unaffected by voice channel bitrate settings, those only tell the client at what bitrate it should send.
1069
+ - A rate limiting feature was added to commands - you can define buckets using the [`bucket`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FCommands%2FRateLimiter%3Abucket) method and use them as a parameter for [`command`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FCommands%2FCommandContainer%3Acommand).
1070
+ - A [`SimpleRateLimiter`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb/Commands/SimpleRateLimiter) class was also added if you want rate limiting independent from commands (e. g. for events)
1071
+ - Connecting to the WebSocket now uses an exponential falloff system so we don't spam Discord with requests anymore.
1072
+ - Debug timestamps are now accurate to milliseconds.
889
1073
 
890
1074
  ### Fixed
891
- * The token cacher will now detect whether a cached token has been invalidated due to a password change.
892
- * `break`ing from an event or command will no longer spew `LocalJumpError`s to the console.
1075
+
1076
+ - The token cacher will now detect whether a cached token has been invalidated due to a password change.
1077
+ - `break`ing from an event or command will no longer spew `LocalJumpError`s to the console.
893
1078
 
894
1079
  ## [1.6.6] - 2016-02-13
1080
+
895
1081
  [1.6.6]: https://github.com/discordrb/discordrb/releases/tag/v1.6.6
896
1082
 
897
1083
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.5...v1.6.6)
898
1084
 
899
1085
  ### Fixed
900
- * Fixed a problem that would cause an incompatibility with Ruby 2.1
901
- * Fixed servers sometimes containing duplicate members
1086
+
1087
+ - Fixed a problem that would cause an incompatibility with Ruby 2.1
1088
+ - Fixed servers sometimes containing duplicate members
902
1089
 
903
1090
  ## [1.6.5] - 2016-02-12
1091
+
904
1092
  [1.6.5]: https://github.com/discordrb/discordrb/releases/tag/v1.6.5
905
1093
 
906
1094
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.4...v1.6.5)
907
1095
 
908
1096
  ### Changed
909
- * The bot will now request the users that would previously be sent all in one READY packet in multiple chunks. This improves startup time slightly and ensures compatibility with the latest Discord change, but it also means that some users won't be in server members lists until a while after creation (usually a couple seconds at most).
1097
+
1098
+ - The bot will now request the users that would previously be sent all in one READY packet in multiple chunks. This improves startup time slightly and ensures compatibility with the latest Discord change, but it also means that some users won't be in server members lists until a while after creation (usually a couple seconds at most).
910
1099
 
911
1100
  ## [1.6.4] - 2016-02-10
1101
+
912
1102
  [1.6.4]: https://github.com/discordrb/discordrb/releases/tag/v1.6.4
913
1103
 
914
1104
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.3...v1.6.4)
915
1105
 
916
1106
  ### Fixed
917
- * Fixed a bug that made the joining of servers using an invite impossible.
1107
+
1108
+ - Fixed a bug that made the joining of servers using an invite impossible.
918
1109
 
919
1110
  ## [1.6.3] - 2016-02-08
1111
+
920
1112
  [1.6.3]: https://github.com/discordrb/discordrb/releases/tag/v1.6.3
921
1113
 
922
1114
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.2...v1.6.3)
923
1115
 
924
1116
  ### Fixed
925
- * Fixed a bug that prevented the banning of users over the API
1117
+
1118
+ - Fixed a bug that prevented the banning of users over the API
926
1119
 
927
1120
  ## [1.6.2] - 2016-02-06
1121
+
928
1122
  [1.6.2]: https://github.com/discordrb/discordrb/releases/tag/v1.6.2
929
1123
 
930
1124
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.1...v1.6.2)
931
1125
 
932
1126
  ### Fixed
933
- * RbNaCl is now installed directly instead of the wrapper that also contains libsodium. This has the disadvantage that you will have to install libsodium manually but at least it's not broken on Windows anymore.
1127
+
1128
+ - RbNaCl is now installed directly instead of the wrapper that also contains libsodium. This has the disadvantage that you will have to install libsodium manually but at least it's not broken on Windows anymore.
934
1129
 
935
1130
  ## [1.6.1] - 2016-02-04
1131
+
936
1132
  [1.6.1]: https://github.com/discordrb/discordrb/releases/tag/v1.6.1
937
1133
 
938
1134
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.0...v1.6.1)
939
1135
 
940
1136
  ### Changed
941
- * It's now possible to prevent the `READY` packet from being printed in debug mode, run `bot.suppress_ready_debug` once before the `bot.run` to do it.
1137
+
1138
+ - It's now possible to prevent the `READY` packet from being printed in debug mode, run `bot.suppress_ready_debug` once before the `bot.run` to do it.
942
1139
 
943
1140
  ### Fixed
944
- * Token cache files with invalid JSON syntax will no longer crash the bot at login.
1141
+
1142
+ - Token cache files with invalid JSON syntax will no longer crash the bot at login.
945
1143
 
946
1144
  ## [1.6.0] - 2016-02-01
1145
+
947
1146
  [1.6.0]: https://github.com/discordrb/discordrb/releases/tag/v1.6.0
948
1147
 
949
1148
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.4...v1.6.0)
950
1149
 
951
1150
  ### Added
952
- * The inline documentation using YARD was greatly improved and is now mostly usable, at least for the data classes and voice classes. It's still not complete enough to be released on GitHub, but you can build it yourself using [YARD](https://yardoc.org/).
953
- * It's now possible to encrypt sent voice data using an optional parameter in `voice_connect`. The encryption uses RbNaCl's [SecretBox](https://github.com/cryptosphere/rbnacl/wiki/Secret-Key-Encryption#algorithm-details) and is enabled by default.
954
- * The [new library comparison](https://discordapi.com/unofficial/comparison.html) is now fully supported, barring voice receive and multi-send: (#39)
955
- * `bot.invite` will create an `Invite` object from a code containing information about it.
956
- * `server.move(user, channel)` will move a user to a different voice channel.
957
- * The events `bot.message_edit` and `bot.message_delete` are now available for message editing and deletion. Note that Discord doesn't provide the content of edited/deleted messages, so you'll have to implement message caching yourself if you really need it.
958
- * The events `bot.user_ban` and `bot.user_unban` are now available for users getting banned/unbanned from servers.
959
- * A bot's name can now be sent using `bot.name=`. This data will be sent to Discord with the user-agent and it might be used for cool statistics in the future.
960
- * Discord server ownership transfer is now implemented using the writer `server.owner=`. (#41)
961
- * `CommandBot`s can now have command aliases by simply using an array of symbols as the command name.
962
- * A utility method `server.default_channel` was implemented that returns the default text channel of a server, usually called #general. (An alias `general_channel` is available too.)
963
- * Tokens will no longer appear in debug output, so you're safe sending output logs to other people.
964
- * A reader `server.owner` that returns the server's owner as a `User` was added. Previously, users had to manually get the `User` object using `bot.user`.
965
- * Most methods that accept IDs or data objects now also accept `Integer`s or `String`s containing the IDs now. This is implemented by adding a method `resolve_id` to all objects that could potentially contain an ID. (Note that this change is not complete yet and I might have missed some methods.) (#40)
966
- * The writer `server.afk_channel_id=` is now deprecated as its functionality is now covered by `server.afk_channel=`.
967
- * A new reader `user.avatar_url` was added that returns the full image URL to a user's avatar.
968
- * To avoid confusion with `avatar_url`, the reader `user.avatar` was renamed to `avatar_id`. (`user.avatar` still exists but is now deprecated.)
969
- * Symbols are now used instead of strings as hash keys in all methods that send JSON data to somewhere. This might improve performance slightly.
1151
+
1152
+ - The inline documentation using YARD was greatly improved and is now mostly usable, at least for the data classes and voice classes. It's still not complete enough to be released on GitHub, but you can build it yourself using [YARD](https://yardoc.org/).
1153
+ - It's now possible to encrypt sent voice data using an optional parameter in `voice_connect`. The encryption uses RbNaCl's [SecretBox](https://github.com/cryptosphere/rbnacl/wiki/Secret-Key-Encryption#algorithm-details) and is enabled by default.
1154
+ - The [new library comparison](https://discordapi.com/unofficial/comparison.html) is now fully supported, barring voice receive and multi-send: (#39)
1155
+ - `bot.invite` will create an `Invite` object from a code containing information about it.
1156
+ - `server.move(user, channel)` will move a user to a different voice channel.
1157
+ - The events `bot.message_edit` and `bot.message_delete` are now available for message editing and deletion. Note that Discord doesn't provide the content of edited/deleted messages, so you'll have to implement message caching yourself if you really need it.
1158
+ - The events `bot.user_ban` and `bot.user_unban` are now available for users getting banned/unbanned from servers.
1159
+ - A bot's name can now be sent using `bot.name=`. This data will be sent to Discord with the user-agent and it might be used for cool statistics in the future.
1160
+ - Discord server ownership transfer is now implemented using the writer `server.owner=`. (#41)
1161
+ - `CommandBot`s can now have command aliases by simply using an array of symbols as the command name.
1162
+ - A utility method `server.default_channel` was implemented that returns the default text channel of a server, usually called #general. (An alias `general_channel` is available too.)
1163
+ - Tokens will no longer appear in debug output, so you're safe sending output logs to other people.
1164
+ - A reader `server.owner` that returns the server's owner as a `User` was added. Previously, users had to manually get the `User` object using `bot.user`.
1165
+ - Most methods that accept IDs or data objects now also accept `Integer`s or `String`s containing the IDs now. This is implemented by adding a method `resolve_id` to all objects that could potentially contain an ID. (Note that this change is not complete yet and I might have missed some methods.) (#40)
1166
+ - The writer `server.afk_channel_id=` is now deprecated as its functionality is now covered by `server.afk_channel=`.
1167
+ - A new reader `user.avatar_url` was added that returns the full image URL to a user's avatar.
1168
+ - To avoid confusion with `avatar_url`, the reader `user.avatar` was renamed to `avatar_id`. (`user.avatar` still exists but is now deprecated.)
1169
+ - Symbols are now used instead of strings as hash keys in all methods that send JSON data to somewhere. This might improve performance slightly.
970
1170
 
971
1171
  ### Fixed
972
- * Fixed the reader `server.afk_channel_id` not containing a value sometimes.
973
- * An issue was fixed where attempting to create a `Server` object from a stub server that didn't contain any role data would cause an exception.
974
- * The `Invite` `server` property will now be initialized directly from the invite data instead of the channel the invite is to, to prevent it being `nil` when the invite channel was stubbed.
975
- * The `inviter` of an `Invite` will now be `nil` instead of causing an exception when it doesn't exist in the invite data.
1172
+
1173
+ - Fixed the reader `server.afk_channel_id` not containing a value sometimes.
1174
+ - An issue was fixed where attempting to create a `Server` object from a stub server that didn't contain any role data would cause an exception.
1175
+ - The `Invite` `server` property will now be initialized directly from the invite data instead of the channel the invite is to, to prevent it being `nil` when the invite channel was stubbed.
1176
+ - The `inviter` of an `Invite` will now be `nil` instead of causing an exception when it doesn't exist in the invite data.
976
1177
 
977
1178
  ## [1.5.4] - 2016-01-16
1179
+
978
1180
  [1.5.4]: https://github.com/discordrb/discordrb/releases/tag/v1.5.4
979
1181
 
980
1182
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.3...v1.5.4)
981
1183
 
982
1184
  ### Changed
983
- * The `opus-ruby` and `levenshtein` dependencies are now optional - if you don't need them, it won't crash immediately (only when you try to use voice / `find` with a threshold > 0, respectively)
1185
+
1186
+ - The `opus-ruby` and `levenshtein` dependencies are now optional - if you don't need them, it won't crash immediately (only when you try to use voice / `find` with a threshold > 0, respectively)
984
1187
 
985
1188
  ### Fixed
986
- * Voice volume can now be properly set when using avconv (#37, thanks @purintai)
987
- * `websocket-client-simple`, which is required for voice, is now specified in the dependencies.
1189
+
1190
+ - Voice volume can now be properly set when using avconv (#37, thanks @purintai)
1191
+ - `websocket-client-simple`, which is required for voice, is now specified in the dependencies.
988
1192
 
989
1193
  ## [1.5.3] - 2016-01-11
1194
+
990
1195
  [1.5.3]: https://github.com/discordrb/discordrb/releases/tag/v1.5.3
991
1196
 
992
1197
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.2...v1.5.3)
993
1198
 
994
1199
  ### Added
995
- * Voice bot length adjustments are now configurable using `bot.voice.adjust_interval` and `bot.voice.adjust_offset` (make sure the latter is less than the first, or no adjustment will be performed at all)
996
- * Length adjustments can now be made more smooth using `bot.voice.adjust_average` (true allows for more smooth adjustments, *may* improve stutteriness but might make it worse as well)
1200
+
1201
+ - Voice bot length adjustments are now configurable using `bot.voice.adjust_interval` and `bot.voice.adjust_offset` (make sure the latter is less than the first, or no adjustment will be performed at all)
1202
+ - Length adjustments can now be made more smooth using `bot.voice.adjust_average` (true allows for more smooth adjustments, _may_ improve stutteriness but might make it worse as well)
997
1203
 
998
1204
  ## [1.5.2] - 2016-01-11
1205
+
999
1206
  [1.5.2]: https://github.com/discordrb/discordrb/releases/tag/v1.5.2
1000
1207
 
1001
1208
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.1...v1.5.2)
1002
1209
 
1003
1210
  ### Added
1004
- * `bot.voice_connect` can now use a channel ID directly.
1005
- * A reader `bot.volume` now exists for the corresponding writer.
1006
- * The attribute `bot.encoder.use_avconv` was added that makes the bot use avconv instead of ffmpeg (for those on Ubuntu 14.x)
1007
- * The PBKDF2 iteration count for token caching was increased to 300,000 for extra security.
1211
+
1212
+ - `bot.voice_connect` can now use a channel ID directly.
1213
+ - A reader `bot.volume` now exists for the corresponding writer.
1214
+ - The attribute `bot.encoder.use_avconv` was added that makes the bot use avconv instead of ffmpeg (for those on Ubuntu 14.x)
1215
+ - The PBKDF2 iteration count for token caching was increased to 300,000 for extra security.
1008
1216
 
1009
1217
  ### Fixed
1010
- * Fix a bug where `play_file` wouldn't properly accept string file paths (#36, thanks @purintai)
1011
- * Fix a concurrency issue where `VoiceBot` would try to read from nil
1218
+
1219
+ - Fix a bug where `play_file` wouldn't properly accept string file paths (#36, thanks @purintai)
1220
+ - Fix a concurrency issue where `VoiceBot` would try to read from nil
1012
1221
 
1013
1222
  ## [1.5.1] - 2016-01-10
1223
+
1014
1224
  [1.5.1]: https://github.com/discordrb/discordrb/releases/tag/v1.5.1
1015
1225
 
1016
1226
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.0...v1.5.1)
1017
1227
 
1018
1228
  ### Added
1019
- * The connection to voice was made more reliable. I haven't experienced any issues with it myself but I got reports where `recv` worked better than `recvmsg`.
1229
+
1230
+ - The connection to voice was made more reliable. I haven't experienced any issues with it myself but I got reports where `recv` worked better than `recvmsg`.
1020
1231
 
1021
1232
  ## [1.5.0] - 2016-01-10
1233
+
1022
1234
  [1.5.0]: https://github.com/discordrb/discordrb/releases/tag/v1.5.0
1023
1235
 
1024
1236
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.8...v1.5.0)
1025
1237
 
1026
1238
  ### Added
1027
- * Voice support: discordrb can now connect to voice using `bot.voice_connect` and do the following things:
1028
- * Play files and URLs using `VoiceBot.play_file`
1029
- * Play arbitrary streams using `VoiceBot.play_io`
1030
- * Set the volume of future playbacks using `VoiceBot.volume=`
1031
- * Pause and resume playback (`VoiceBot.pause` and `VoiceBot.continue`)
1032
- * Authentication tokens are now cached and no login request will be made if a cached token is found. This is mostly to reduce strain on Discord's servers.
1239
+
1240
+ - Voice support: discordrb can now connect to voice using `bot.voice_connect` and do the following things:
1241
+ - Play files and URLs using `VoiceBot.play_file`
1242
+ - Play arbitrary streams using `VoiceBot.play_io`
1243
+ - Set the volume of future playbacks using `VoiceBot.volume=`
1244
+ - Pause and resume playback (`VoiceBot.pause` and `VoiceBot.continue`)
1245
+ - Authentication tokens are now cached and no login request will be made if a cached token is found. This is mostly to reduce strain on Discord's servers.
1033
1246
 
1034
1247
  ### Fixed
1035
- * Some latent ID casting errors were fixed - those would probably never have been noticed anyway, but they're fixed now.
1036
- * `Bot.parse_mention` now works, it didn't work at all previously
1248
+
1249
+ - Some latent ID casting errors were fixed - those would probably never have been noticed anyway, but they're fixed now.
1250
+ - `Bot.parse_mention` now works, it didn't work at all previously
1037
1251
 
1038
1252
  ## [1.4.8] - 2016-01-06
1253
+
1039
1254
  [1.4.8]: https://github.com/discordrb/discordrb/releases/tag/v1.4.8
1040
1255
 
1041
1256
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.7...v1.4.8)
1042
1257
 
1043
1258
  ### Added
1044
- * The `User` class now has the methods `add_role` and `remove_role` which add a role to a user and remove it, respectively.
1045
- * All data classes now have a useful `==` implementation.
1046
- * **The `Game` class and all references to it were removed**. Games are now only identified by their name.
1259
+
1260
+ - The `User` class now has the methods `add_role` and `remove_role` which add a role to a user and remove it, respectively.
1261
+ - All data classes now have a useful `==` implementation.
1262
+ - **The `Game` class and all references to it were removed**. Games are now only identified by their name.
1047
1263
 
1048
1264
  ### Fixed
1049
- * When a role is deleted, the ID is now obtained correctly. (#30)
1265
+
1266
+ - When a role is deleted, the ID is now obtained correctly. (#30)
1050
1267
 
1051
1268
  ## [1.4.7] - 2016-01-03
1269
+
1052
1270
  [1.4.7]: https://github.com/discordrb/discordrb/releases/tag/v1.4.7
1053
1271
 
1054
1272
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.6...v1.4.7)
1055
1273
 
1056
1274
  ### Added
1057
- * Presence event handling is now divided into two separate events; `PresenceEvent` to handle online/offline/idle statuses and `PlayingEvent` to handle users playing games.
1058
- * The `user` property of `MessageEvent` is now automatically resolved to the cached user, so you can modify roles instantly without having to resolve it yourself.
1059
- * `Message` now has a useful `to_s` method that just returns the content.
1275
+
1276
+ - Presence event handling is now divided into two separate events; `PresenceEvent` to handle online/offline/idle statuses and `PlayingEvent` to handle users playing games.
1277
+ - The `user` property of `MessageEvent` is now automatically resolved to the cached user, so you can modify roles instantly without having to resolve it yourself.
1278
+ - `Message` now has a useful `to_s` method that just returns the content.
1060
1279
 
1061
1280
  ### Fixed
1062
- * The `TypingEvent` `user` property is now initialized correctly (#29, thanks @purintai)
1281
+
1282
+ - The `TypingEvent` `user` property is now initialized correctly (#29, thanks @purintai)
1063
1283
 
1064
1284
  ## [1.4.6] - 2015-12-25
1285
+
1065
1286
  [1.4.6]: https://github.com/discordrb/discordrb/releases/tag/v1.4.6
1066
1287
 
1067
1288
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.4...v1.4.6)
1068
1289
 
1069
1290
  ### Fixed
1070
- * The `user` and `server` properties of `PresenceEvent` are now initialized correctly.
1291
+
1292
+ - The `user` and `server` properties of `PresenceEvent` are now initialized correctly.
1071
1293
 
1072
1294
  ## 1.4.5
1295
+
1073
1296
  <!-- This was never tagged in the git repo -->
1297
+
1074
1298
  ### Changed
1075
- * The `Bot.game` property can now be set to an arbitrary string.
1076
- * Discord mentions are handled in the old way again, after Discord reverted an API change.
1299
+
1300
+ - The `Bot.game` property can now be set to an arbitrary string.
1301
+ - Discord mentions are handled in the old way again, after Discord reverted an API change.
1077
1302
 
1078
1303
  ## [1.4.4] - 2015-12-18
1304
+
1079
1305
  [1.4.4]: https://github.com/discordrb/discordrb/releases/tag/v1.4.4
1080
1306
 
1081
1307
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.3...v1.4.4)
1082
1308
 
1083
1309
  ### Added
1084
- * Add `Server.leave_server` as an alias for `delete_server`
1085
- * Use the new Discord mention format (mentions array). **Reverted in 1.4.5**
1086
- * Discord rate limited API calls are now handled correctly - discordrb will try again after the specified time.
1087
- * Debug logging is now handled by a separate `Logger` class
1310
+
1311
+ - Add `Server.leave_server` as an alias for `delete_server`
1312
+ - Use the new Discord mention format (mentions array). **Reverted in 1.4.5**
1313
+ - Discord rate limited API calls are now handled correctly - discordrb will try again after the specified time.
1314
+ - Debug logging is now handled by a separate `Logger` class
1088
1315
 
1089
1316
  ### Fixed
1090
- * Message timestamps are now parsed correctly.
1091
- * The quickadders for awaits (`User.await`, `Channel.await` etc.) now add the correct awaits.
1317
+
1318
+ - Message timestamps are now parsed correctly.
1319
+ - The quickadders for awaits (`User.await`, `Channel.await` etc.) now add the correct awaits.
1092
1320
 
1093
1321
  ## [1.4.3] - 2015-12-11
1322
+
1094
1323
  [1.4.3]: https://github.com/discordrb/discordrb/releases/tag/v1.4.3
1095
1324
 
1096
1325
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.2...v1.4.3)
1097
1326
 
1098
1327
  ### Added
1099
- * Added a method `Bot.find_user` analogous to `Bot.find`.
1328
+
1329
+ - Added a method `Bot.find_user` analogous to `Bot.find`.
1100
1330
 
1101
1331
  ### Fixed
1102
- * Remove a leftover debug line (#23, thanks @VxJasonxV)
1332
+
1333
+ - Remove a leftover debug line (#23, thanks @VxJasonxV)
1103
1334
 
1104
1335
  ## [1.4.2] - 2015-12-10
1336
+
1105
1337
  [1.4.2]: https://github.com/discordrb/discordrb/releases/tag/v1.4.2
1106
1338
 
1107
1339
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.1...v1.4.2)
1108
1340
 
1109
1341
  ### Changed
1110
- * discordrb will now send a user agent in the format requested by the Discord devs.
1342
+
1343
+ - discordrb will now send a user agent in the format requested by the Discord devs.
1111
1344
 
1112
1345
  ## [1.4.1] - 2015-12-07
1346
+
1113
1347
  [1.4.1]: https://github.com/discordrb/discordrb/releases/tag/v1.4.1
1114
1348
 
1115
1349
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.0...v1.4.1)
1116
1350
 
1117
1351
  ### Fixed
1118
- * Empty messages will now never be sent
1119
- * The command-not-found message in `CommandBot` can now be disabled properly
1352
+
1353
+ - Empty messages will now never be sent
1354
+ - The command-not-found message in `CommandBot` can now be disabled properly
1120
1355
 
1121
1356
  ## [1.4.0] - 2015-12-04
1357
+
1122
1358
  [1.4.0]: https://github.com/discordrb/discordrb/releases/tag/v1.4.0
1123
1359
 
1124
1360
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.12...v1.4.0)
1125
1361
 
1126
1362
  ### Added
1127
- * All methods and classes where the words "colour" or "color" are used now have had aliases added with the respective other spelling. (Internally, everything uses "colour" now).
1128
- * discordrb now supports everything on the Discord API comparison, except for voice (see also #22)
1129
- * Roles can now be created, edited and deleted and their permissions modified.
1130
- * There is now a method to get a channel's message history.
1131
- * The bot's user profile can now be edited.
1132
- * Servers can now be created, edited and deleted.
1133
- * The user can now display a "typing" message in a channel.
1134
- * Invites can now be created and deleted, and an `Invite` class was made to represent them.
1135
- * Command and event handling is now threaded, with each command/event handler execution in a separate thread.
1136
- * Debug messages now specify the current thread's name.
1137
- * discordrb now handles created/updated/deleted servers properly with events added to handle them.
1138
- * The list of games handled by Discord will now be updated automatically.
1363
+
1364
+ - All methods and classes where the words "colour" or "color" are used now have had aliases added with the respective other spelling. (Internally, everything uses "colour" now).
1365
+ - discordrb now supports everything on the Discord API comparison, except for voice (see also #22)
1366
+ - Roles can now be created, edited and deleted and their permissions modified.
1367
+ - There is now a method to get a channel's message history.
1368
+ - The bot's user profile can now be edited.
1369
+ - Servers can now be created, edited and deleted.
1370
+ - The user can now display a "typing" message in a channel.
1371
+ - Invites can now be created and deleted, and an `Invite` class was made to represent them.
1372
+ - Command and event handling is now threaded, with each command/event handler execution in a separate thread.
1373
+ - Debug messages now specify the current thread's name.
1374
+ - discordrb now handles created/updated/deleted servers properly with events added to handle them.
1375
+ - The list of games handled by Discord will now be updated automatically.
1139
1376
 
1140
1377
  ### Fixed
1141
- * Fixed a bug where command handling would crash if the command didn't exist.
1378
+
1379
+ - Fixed a bug where command handling would crash if the command didn't exist.
1142
1380
 
1143
1381
  ## [1.3.12] - 2015-11-30
1382
+
1144
1383
  [1.3.12]: https://github.com/discordrb/discordrb/releases/tag/v1.3.12
1145
1384
 
1146
1385
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.11...v1.3.12)
1147
1386
 
1148
1387
  ### Added
1149
- * Add an attribute `Bot.should_parse_self` (false by default) that prevents the bot from raising an event if it receives a message from itself.
1150
- * `User.bot?` and `Message.from_bot?` were implemented to check whether the user is the bot or the message was sent by it.
1151
- * Add an event for private messages specifically (`Bot.pm` and `PrivateMessageEvent`)
1388
+
1389
+ - Add an attribute `Bot.should_parse_self` (false by default) that prevents the bot from raising an event if it receives a message from itself.
1390
+ - `User.bot?` and `Message.from_bot?` were implemented to check whether the user is the bot or the message was sent by it.
1391
+ - Add an event for private messages specifically (`Bot.pm` and `PrivateMessageEvent`)
1152
1392
 
1153
1393
  ### Fixed
1154
- * Fix the `MessageEvent` attribute that checks whether the message is from the bot not working at all.
1394
+
1395
+ - Fix the `MessageEvent` attribute that checks whether the message is from the bot not working at all.
1155
1396
 
1156
1397
  ## [1.3.11] - 2015-11-29
1398
+
1157
1399
  [1.3.11]: https://github.com/discordrb/discordrb/releases/tag/v1.3.11
1158
1400
 
1159
1401
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.10...v1.3.11)
1160
1402
 
1161
1403
  ### Added
1162
- * Add a user selector (`:bot`) that is usable in the `from:` `MessageEvent` attribute to check whether the message was sent by a bot.
1404
+
1405
+ - Add a user selector (`:bot`) that is usable in the `from:` `MessageEvent` attribute to check whether the message was sent by a bot.
1163
1406
 
1164
1407
  ### Fixed
1165
- * `Channel.private?` now checks for the server being nil instead of the `is_private` attribute provided by Discord as the latter is unreliable. (wtf)
1408
+
1409
+ - `Channel.private?` now checks for the server being nil instead of the `is_private` attribute provided by Discord as the latter is unreliable. (wtf)
1166
1410
 
1167
1411
  ## [1.3.10] - 2015-11-28
1412
+
1168
1413
  [1.3.10]: https://github.com/discordrb/discordrb/releases/tag/v1.3.10
1169
1414
 
1170
1415
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.9...v1.3.10)
1171
1416
 
1172
1417
  ### Added
1173
- * Add a method `Channel.private?` to check for a PM channel
1174
- * Add a `MessageEvent` attribute (`:private`) to check whether a message was sent in a PM channel
1175
- * Add various aliases to `MessageEvent` attributes
1176
- * Allow regexes to check for strings in `MessageEvent` attributes
1418
+
1419
+ - Add a method `Channel.private?` to check for a PM channel
1420
+ - Add a `MessageEvent` attribute (`:private`) to check whether a message was sent in a PM channel
1421
+ - Add various aliases to `MessageEvent` attributes
1422
+ - Allow regexes to check for strings in `MessageEvent` attributes
1177
1423
 
1178
1424
  ### Fixed
1179
- * The `matches_all` method would break in certain edge cases. This didn't really affect discordrb and I don't think anyone else uses that method (it's pretty useless otherwise). This has been fixed
1425
+
1426
+ - The `matches_all` method would break in certain edge cases. This didn't really affect discordrb and I don't think anyone else uses that method (it's pretty useless otherwise). This has been fixed
1180
1427
 
1181
1428
  ## [1.3.9] - 2015-11-27
1429
+
1182
1430
  [1.3.9]: https://github.com/discordrb/discordrb/releases/tag/v1.3.9
1183
1431
 
1184
1432
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.8...v1.3.9)
1185
1433
 
1186
1434
  ### Added
1187
- * Add awaits, a powerful way to add temporary event handlers.
1188
- * Add a `Bot.find` method to fuzzy-search for channels.
1189
- * Add methods to kick, ban and unban users.
1435
+
1436
+ - Add awaits, a powerful way to add temporary event handlers.
1437
+ - Add a `Bot.find` method to fuzzy-search for channels.
1438
+ - Add methods to kick, ban and unban users.
1190
1439
 
1191
1440
  ### Fixed
1192
- * Permission overrides now work correctly for private channels (i. e. they don't exist at all)
1193
- * Users joining and leaving servers are now handled correctly.
1441
+
1442
+ - Permission overrides now work correctly for private channels (i. e. they don't exist at all)
1443
+ - Users joining and leaving servers are now handled correctly.
1194
1444
 
1195
1445
  ## [1.3.8] - 2015-11-12
1446
+
1196
1447
  [1.3.8]: https://github.com/discordrb/discordrb/releases/tag/v1.3.8
1197
1448
 
1198
1449
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.7...v1.3.8)
1199
1450
 
1200
1451
  ### Added
1201
- * Added `Bot.users` and `Bot.servers` readers to get the list of users and servers.
1452
+
1453
+ - Added `Bot.users` and `Bot.servers` readers to get the list of users and servers.
1202
1454
 
1203
1455
  ### Fixed
1204
- * POST requests to API calls that don't need a payload will now send a `nil` payload instead. This fixes the bot being unable to join any servers and various other latent problems. (#21, thanks @davidkus)
1456
+
1457
+ - POST requests to API calls that don't need a payload will now send a `nil` payload instead. This fixes the bot being unable to join any servers and various other latent problems. (#21, thanks @davidkus)
1205
1458
 
1206
1459
  ## [1.3.7] - 2015-11-07
1460
+
1207
1461
  [1.3.7]: https://github.com/discordrb/discordrb/releases/tag/v1.3.7
1208
1462
 
1209
1463
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.6...v1.3.7)
1210
1464
 
1211
1465
  ### Fixed
1212
- * Fix the command bot being included wrong, which caused crashes upon startup.
1466
+
1467
+ - Fix the command bot being included wrong, which caused crashes upon startup.
1213
1468
 
1214
1469
  ## [1.3.6] - 2015-11-07
1470
+
1215
1471
  [1.3.6]: https://github.com/discordrb/discordrb/releases/tag/v1.3.6
1216
1472
 
1217
1473
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.5...v1.3.6)
1218
1474
 
1219
1475
  ### Added
1220
- * The bot can now be stopped from the script using the new method `Bot.stop`.
1476
+
1477
+ - The bot can now be stopped from the script using the new method `Bot.stop`.
1221
1478
 
1222
1479
  ### Fixed
1223
- * Fix some wrong file requires which caused crashes sometimes.
1480
+
1481
+ - Fix some wrong file requires which caused crashes sometimes.
1224
1482
 
1225
1483
  ## [1.3.5] - 2015-11-07
1484
+
1226
1485
  [1.3.5]: https://github.com/discordrb/discordrb/releases/tag/v1.3.5
1227
1486
 
1228
1487
  [View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.4...v1.3.5)
1229
1488
 
1230
1489
  ### Added
1231
- * The bot can now be run asynchronously using `Bot.run(:async)` to do further initialization after the bot was started.
1490
+
1491
+ - The bot can now be run asynchronously using `Bot.run(:async)` to do further initialization after the bot was started.