discordrb 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +44 -18
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -1
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -1
- data/.github/workflows/codeql.yml +65 -0
- data/.markdownlint.json +4 -0
- data/.rubocop.yml +8 -2
- data/CHANGELOG.md +419 -222
- data/LICENSE.txt +1 -1
- data/README.md +37 -25
- data/discordrb-webhooks.gemspec +4 -1
- data/discordrb.gemspec +9 -6
- data/lib/discordrb/api/application.rb +202 -0
- data/lib/discordrb/api/channel.rb +182 -11
- data/lib/discordrb/api/interaction.rb +54 -0
- data/lib/discordrb/api/invite.rb +2 -2
- data/lib/discordrb/api/server.rb +42 -19
- data/lib/discordrb/api/user.rb +9 -3
- data/lib/discordrb/api/webhook.rb +57 -0
- data/lib/discordrb/api.rb +19 -5
- data/lib/discordrb/bot.rb +328 -33
- data/lib/discordrb/cache.rb +27 -22
- data/lib/discordrb/commands/command_bot.rb +14 -7
- data/lib/discordrb/commands/container.rb +1 -1
- data/lib/discordrb/commands/parser.rb +2 -2
- data/lib/discordrb/commands/rate_limiter.rb +1 -1
- data/lib/discordrb/container.rb +132 -3
- data/lib/discordrb/data/activity.rb +8 -1
- data/lib/discordrb/data/attachment.rb +15 -0
- data/lib/discordrb/data/audit_logs.rb +3 -3
- data/lib/discordrb/data/channel.rb +167 -23
- data/lib/discordrb/data/component.rb +229 -0
- data/lib/discordrb/data/integration.rb +42 -3
- data/lib/discordrb/data/interaction.rb +800 -0
- data/lib/discordrb/data/invite.rb +2 -2
- data/lib/discordrb/data/member.rb +108 -33
- data/lib/discordrb/data/message.rb +100 -20
- data/lib/discordrb/data/overwrite.rb +13 -7
- data/lib/discordrb/data/role.rb +58 -1
- data/lib/discordrb/data/server.rb +82 -80
- data/lib/discordrb/data/user.rb +69 -9
- data/lib/discordrb/data/webhook.rb +97 -4
- data/lib/discordrb/data.rb +3 -0
- data/lib/discordrb/errors.rb +44 -3
- data/lib/discordrb/events/channels.rb +1 -1
- data/lib/discordrb/events/interactions.rb +482 -0
- data/lib/discordrb/events/message.rb +9 -6
- data/lib/discordrb/events/presence.rb +21 -14
- data/lib/discordrb/events/reactions.rb +0 -1
- data/lib/discordrb/events/threads.rb +96 -0
- data/lib/discordrb/gateway.rb +30 -17
- data/lib/discordrb/permissions.rb +59 -34
- data/lib/discordrb/version.rb +1 -1
- data/lib/discordrb/voice/encoder.rb +13 -4
- data/lib/discordrb/voice/network.rb +18 -7
- data/lib/discordrb/voice/sodium.rb +3 -1
- data/lib/discordrb/voice/voice_bot.rb +3 -3
- data/lib/discordrb/webhooks.rb +2 -0
- data/lib/discordrb.rb +37 -4
- metadata +53 -19
- data/.codeclimate.yml +0 -16
- data/.travis.yml +0 -32
- data/bin/travis_build_docs.sh +0 -17
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,59 @@
|
|
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
|
|
8
|
+
## [3.5.0] - 2023-07-05
|
9
|
+
[3.5.0]: https://github.com/shardlab/discordrb/releases/tag/v3.5.0
|
10
|
+
|
11
|
+
[View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.2..v3.5.0)
|
12
|
+
|
13
|
+
### Summary
|
14
|
+
|
15
|
+
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.
|
16
|
+
|
17
|
+
## [3.4.2] - 2020-02-05
|
18
|
+
|
19
|
+
[3.4.2]: https://github.com/shardlab/discordrb/releases/tag/v3.4.2
|
20
|
+
|
21
|
+
[View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.1..v3.4.2)
|
22
|
+
|
23
|
+
### Summary
|
24
|
+
|
25
|
+
I failed to update rest-client dependencies properly, and discovered that you can't republish gem versions the hard way.
|
26
|
+
|
27
|
+
### Changed
|
28
|
+
|
29
|
+
- `rest-client` has a requirement of `>= 2.0.0` on both `discordrb` and `discordrb-webhooks`
|
30
|
+
|
31
|
+
## [3.4.1] - 2020-02-04
|
32
|
+
|
33
|
+
[3.4.1]: https://github.com/shardlab/discordrb/releases/tag/v3.4.1
|
34
|
+
|
35
|
+
[View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.0..v3.4.1)
|
36
|
+
|
37
|
+
### Summary
|
38
|
+
|
39
|
+
With 3.4.0, mistakes were made during the version bump leading to a bit of a dependency issue between `discordrb` and `discordrb-webhooks` (sorry!).
|
40
|
+
This micro bump fixes this, fixes a few other code issues, and adds a few minor features.
|
41
|
+
|
42
|
+
### Added
|
43
|
+
|
44
|
+
- Added support for `competing` activity types ([#21](https://github.com/shardlab/discordrb/pull/21), thanks @kaine119)
|
45
|
+
- Support for a callable command_does_not_exist_message ([#25](https://github.com/shardlab/discordrb/pull/25), thanks @kmcphillips)
|
46
|
+
|
47
|
+
### Fixed
|
48
|
+
|
49
|
+
- `Bot#send_temporary_message` now properly passes `message_reference` ([#17](https://github.com/shardlab/discordrb/pull/17) thanks @swarley)
|
50
|
+
- Rate limit precision is only supplied when the route requires headers ([#11](https://github.com/shardlab/discordrb/pull/11) thanks @dali546)
|
51
|
+
- Remove pointless conditional in `Invite` initializer ([#26](https://github.com/shardlab/discordrb/pull/26) thanks @swarley)
|
52
|
+
- All API methods link to their official documentation counterparts ([#12](https://github.com/shardlab/discordrb/pull/12) thanks @kaine119)
|
53
|
+
- 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)
|
54
|
+
|
7
55
|
## [3.4.0] - 2020-12-06
|
56
|
+
|
8
57
|
[3.4.0]: https://github.com/shardlab/discordrb/releases/tag/v3.3.0
|
9
58
|
|
10
59
|
[View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.0...v3.3.0)
|
@@ -21,8 +70,8 @@ Intents allow you to pick and choose what types of events are fed to your bot ov
|
|
21
70
|
Discordrb::Bot.new(token: 'B0T.T0K3N', intents: %i[servers server_messages])
|
22
71
|
```
|
23
72
|
|
24
|
-
|
25
73
|
In this example, we would only recieve the following events
|
74
|
+
|
26
75
|
- GUILD_CREATE
|
27
76
|
- GUILD_UPDATE
|
28
77
|
- GUILD_DELETE
|
@@ -42,7 +91,7 @@ This feature is still experimental, as it is still unclear how some interactions
|
|
42
91
|
|
43
92
|
### Added
|
44
93
|
|
45
|
-
- `Bot#parse_mentions`, which extracts
|
94
|
+
- `Bot#parse_mentions`, which extracts _all_ mentions found in a string ([#526](https://github.com/discordrb/discordrb/pull/526), thanks @SanksTheYokai)
|
46
95
|
- Issue and pull request templates ([#585](https://github.com/discordrb/discordrb/pull/585))
|
47
96
|
- `Server#bot` method for obtaining your bot's own `Member` on a particular server ([#597](https://github.com/discordrb/discordrb/pull/597))
|
48
97
|
- `Attachment#spoiler?`, to check if an attachment is a spoiler or not ([#603](https://github.com/discordrb/discordrb/pull/603), thanks @swarley)
|
@@ -115,7 +164,7 @@ This feature is still experimental, as it is still unclear how some interactions
|
|
115
164
|
- **(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))
|
116
165
|
- `Channel#nsfw=` correctly forwards updated value to the API ([#628](https://github.com/discordrb/discordrb/pull/628))
|
117
166
|
- `Emoji#==` works correctly for unicode emoji ([#590](https://github.com/discordrb/discordrb/pull/590), thanks @soukouki)
|
118
|
-
- Attribute matching for voice state update events ([#625](https://github.com/discordrb/discordrb/pull/625), thanks @swarley)
|
167
|
+
- Attribute matching for voice state update events ([#625](https://github.com/discordrb/discordrb/pull/625), thanks @swarley)
|
119
168
|
- `Emoji#to_reaction` works correctly for unicode emoji ([#642](https://github.com/discordrb/discordrb/pull/642), thanks @z64)
|
120
169
|
- `Server#add_member_using_token` returns `nil` when user is already a member ([#643](https://github.com/discordrb/discordrb/pull/643), thanks @swarley)
|
121
170
|
- `CommandBot`'s `Integer` parser interprets all integers as base 10 ([#656](https://github.com/discordrb/discordrb/pull/656), thanks @joshleblanc)
|
@@ -133,11 +182,11 @@ This feature is still experimental, as it is still unclear how some interactions
|
|
133
182
|
- Removed dependency on `rbnacl` in favor of our own FFI bindings ([#641](https://github.com/discordrb/discordrb/pull/641), thanks @z64)
|
134
183
|
|
135
184
|
## [3.3.0] - 2018-10-27
|
185
|
+
|
136
186
|
[3.3.0]: https://github.com/discordrb/discordrb/releases/tag/v3.3.0
|
137
187
|
|
138
188
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.1...v3.3.0)
|
139
189
|
|
140
|
-
|
141
190
|
### Summary
|
142
191
|
|
143
192
|
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.
|
@@ -152,7 +201,7 @@ Since there is a lot here, here are highlights of the more notable changes in th
|
|
152
201
|
- `CommandBot` now supports a new method of "aliasing" commands with the `aliases:` keyword. It accepts an array
|
153
202
|
of symbols of alternate command names. Currently this is supported by passing an array of symbols for the command
|
154
203
|
name itself, but this essentially makes "copies" of the command, meaning each alias will show up in your help command.
|
155
|
-
Using `aliases` instead, the library will recognize that these other names
|
204
|
+
Using `aliases` instead, the library will recognize that these other names _are aliases_ instead of copying the command.
|
156
205
|
Aliases will be listed when users use `!help` with the command name, or any of its aliases. For now you may chose to use
|
157
206
|
either style, but you cannot use both. Specifying an array for the command name is now considered deprecated.
|
158
207
|
|
@@ -251,7 +300,7 @@ Thank you to all of our contributors!
|
|
251
300
|
- `Voice::Encoder#encode_file` now accepts options for ffmpeg ([#341](https://github.com/discordrb/discordrb/pull/341), thanks @oyisre)
|
252
301
|
- Objects that implement `IDObject` can now be compared using more operators ([#346](https://github.com/discordrb/discordrb/pull/346), thanks @mattantonelli)
|
253
302
|
- Filled in permissions bit for viewing a server's audit log ([#349](https://github.com/discordrb/discordrb/pull/349), thanks @Daniel-Worrall)
|
254
|
-
- 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))
|
303
|
+
- <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))
|
255
304
|
- Reaction events raised from the bot's actions will respect `parse_self` ([#350](https://github.com/discordrb/discordrb/pull/350), thanks @Daniel-Worrall)
|
256
305
|
- `Webhooks::Embed#initialize` parses its `color`/`colour` argument ([#364](https://github.com/discordrb/discordrb/pull/364), thanks @Daniel-Worrall)
|
257
306
|
- Webhook related events can now be matched on webhook ID ([#363](https://github.com/discordrb/discordrb/pull/363), thanks @Daniel-Worrall)
|
@@ -331,34 +380,41 @@ Thank you to all of our contributors!
|
|
331
380
|
- `Attachment#initialize` correctly sets `@id` instance variable ([#575](https://github.com/discordrb/discordrb/pull/575), thanks @kandayo)
|
332
381
|
|
333
382
|
## [3.2.1] - 2017-02-18
|
383
|
+
|
334
384
|
[3.2.1]: https://github.com/discordrb/discordrb/releases/tag/v3.2.1
|
335
385
|
|
336
386
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.0.1...v3.2.1)
|
337
387
|
|
338
388
|
### Changed
|
389
|
+
|
339
390
|
- `Bot#stop` and `Gateway#stop` now explicitly return `nil`, for more convenient use in commands
|
340
391
|
- The API method to query for users has been removed as the endpoint no longer exists
|
341
392
|
- 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)
|
342
393
|
- 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))
|
343
394
|
|
344
395
|
### Fixed
|
396
|
+
|
345
397
|
- Fixed another bug with resumes that caused issues when resuming a zombie connection
|
346
398
|
- Fixed a bug that caused issues when playing short files ([#326](https://github.com/discordrb/discordrb/issues/316))
|
347
399
|
|
348
400
|
## [3.2.0.1] - 2017-01-29
|
401
|
+
|
349
402
|
[3.2.0.1]: https://github.com/discordrb/discordrb/releases/tag/v3.2.0.1
|
350
403
|
|
351
404
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.0...v3.2.0.1)
|
352
405
|
|
353
406
|
### Fixed
|
407
|
+
|
354
408
|
- Attempt to fix an issue that causes a strange problem with dependencies when installing discordrb
|
355
409
|
|
356
410
|
## [3.2.0] - 2017-01-29
|
411
|
+
|
357
412
|
[3.2.0]: https://github.com/discordrb/discordrb/releases/tag/v3.2.0
|
358
413
|
|
359
414
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.1.1...v3.2.0)
|
360
415
|
|
361
416
|
### Added
|
417
|
+
|
362
418
|
- Various parts of gateway error handling were improved, leading to significant stability improvements:
|
363
419
|
- A long standing bug was fixed that prevented resumes in most cases, which caused unnecessary reconnections.
|
364
420
|
- The error handler that handles problems with sending the raw data over TCP now catches errors more broadly.
|
@@ -369,7 +425,7 @@ Thank you to all of our contributors!
|
|
369
425
|
- 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`
|
370
426
|
- `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)
|
371
427
|
- Added type checking and conversion for commands ([#298](https://github.com/discordrb/discordrb/pull/298), thanks @ohtaavi)
|
372
|
-
- Bulk deleting messages now checks for message age (see also [
|
428
|
+
- 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.
|
373
429
|
- 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)).
|
374
430
|
- Game types and stream URLs are now cached ([#297](https://github.com/discordrb/discordrb/issues/297))
|
375
431
|
- The default non-streaming game was changed to be `0` instead of `nil` ([#277](https://github.com/discordrb/discordrb/pull/277), thanks @zeyla)
|
@@ -386,6 +442,7 @@ Thank you to all of our contributors!
|
|
386
442
|
- `Server#role` now resolves IDs, so they can be passed as strings if necessary.
|
387
443
|
|
388
444
|
### Fixed
|
445
|
+
|
389
446
|
- Fixed bots' shard settings being ignored in certain cases
|
390
447
|
- Parsing role mentions using `Bot#parse_mention` works properly now.
|
391
448
|
- Fixed some specific REST methods that were broken by the API module refactor ([#302](https://github.com/discordrb/discordrb/pull/302), thanks @LikeLakers2)
|
@@ -406,19 +463,23 @@ Thank you to all of our contributors!
|
|
406
463
|
- Fixed a specific edge case in command chain handling where handling commands with the same name as the chain delimiter was broken
|
407
464
|
|
408
465
|
## [3.1.1] - 2016-10-21
|
466
|
+
|
409
467
|
[3.1.1]: https://github.com/discordrb/discordrb/releases/tag/v3.1.1
|
410
468
|
|
411
469
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.1.0...v3.1.1)
|
412
470
|
|
413
471
|
### Fixed
|
472
|
+
|
414
473
|
- An oversight where a `GUILD_DELETE` dispatch would cause an internal error was fixed. ([#256](https://github.com/discordrb/discordrb/pull/256), thanks @greenbigfrog)
|
415
474
|
|
416
475
|
## [3.1.0] - 2016-10-20
|
476
|
+
|
417
477
|
[3.1.0]: https://github.com/discordrb/discordrb/releases/tag/v3.1.0
|
418
478
|
|
419
479
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.2...v3.1.0)
|
420
480
|
|
421
481
|
### Added
|
482
|
+
|
422
483
|
- Emoji handling support ([#226](https://github.com/discordrb/discordrb/pull/226), thanks @greenbigfrog)
|
423
484
|
- 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)
|
424
485
|
- The bulk deletion endpoint is now exposed directly using the `Channel#delete_messages` method ([#235](https://github.com/discordrb/discordrb/pull/235), thanks @z64)
|
@@ -427,6 +488,7 @@ Thank you to all of our contributors!
|
|
427
488
|
- The specs have been improved; they're still not exhaustive by far but there are at least slightly more now.
|
428
489
|
|
429
490
|
### Fixed
|
491
|
+
|
430
492
|
- 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)
|
431
493
|
- Fixed logger token redaction.
|
432
494
|
- `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)
|
@@ -435,17 +497,21 @@ Thank you to all of our contributors!
|
|
435
497
|
- Changing nicknames works again, it has apparently been broken in 3.0.0.
|
436
498
|
|
437
499
|
## [3.0.2] - 2016-10-07
|
500
|
+
|
438
501
|
[3.0.2]: https://github.com/discordrb/discordrb/releases/tag/v3.0.2
|
439
502
|
|
440
503
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.1...v3.0.2)
|
441
504
|
|
442
505
|
### Changed
|
506
|
+
|
443
507
|
- A small change to how CommandBot parameter lists are formatted ([#240](https://github.com/discordrb/discordrb/pull/240), thanks @FormalHellhound)
|
444
508
|
|
445
509
|
### Fixed
|
510
|
+
|
446
511
|
- 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)
|
447
512
|
|
448
513
|
## [3.0.1] - 2016-10-01
|
514
|
+
|
449
515
|
[3.0.1]: https://github.com/discordrb/discordrb/releases/tag/v3.0.1
|
450
516
|
|
451
517
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.0...v3.0.1)
|
@@ -453,15 +519,18 @@ Thank you to all of our contributors!
|
|
453
519
|
A tiny update to support webhook-sent messages properly!
|
454
520
|
|
455
521
|
### Added
|
522
|
+
|
456
523
|
- Added the utility methods `Message#webhook?` and `User#webhook?` to check whether a message or a user belongs to a webhook
|
457
524
|
- Added `Message#webhook_id` to get the ID of the sending webhook for webhook messages
|
458
525
|
- Added the `webhook_commands` parameter to CommandBot that, if false (default true), prevents webhook-sent messages from being parsed and handled as commands.
|
459
526
|
|
460
527
|
### Fixed
|
528
|
+
|
461
529
|
- Fixed webhook-sent messages being ignored because their author couldn't be resolved.
|
462
530
|
- Fixed a minor performance problem where a CommandBot would create unnecessarily create redundant objects for every received message.
|
463
531
|
|
464
532
|
## [3.0.0] - 2016-09-30
|
533
|
+
|
465
534
|
[3.0.0]: https://github.com/discordrb/discordrb/releases/tag/v3.0.0
|
466
535
|
|
467
536
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.3...v3.0.0)
|
@@ -471,9 +540,10 @@ I didn't think there could possibly be a release larger than 2.0.0 was, but here
|
|
471
540
|
As with 2.0.0, there are some breaking changes! They are, as always, highlighted in bold.
|
472
541
|
|
473
542
|
### Added
|
543
|
+
|
474
544
|
- **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).
|
475
545
|
- 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.**
|
476
|
-
- **User login using email and password has been removed**. Use a user token instead, see also [here](https://github.com/
|
546
|
+
- **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).
|
477
547
|
- 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)
|
478
548
|
- **Custom prefix handlers for `CommandBot`s now get the full message object as their parameter rather than only the content**, for even more flexibility.
|
479
549
|
- 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.
|
@@ -515,13 +585,14 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
515
585
|
- A method `Bot#connected?` has been added to check whether the bot is currently connected to the gateway.
|
516
586
|
- 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.
|
517
587
|
- 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)
|
518
|
-
- 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/
|
588
|
+
- 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).
|
519
589
|
- Rogue presences, i.e. presences without an associated cached member, now print a log message instead of being completely ignored
|
520
590
|
- A variety of aliases have been added to existing methods.
|
521
591
|
- An example to show off voice sending has been added to the repo, and existing examples have been improved.
|
522
592
|
- A large amount of fixes and clarifications have been made to the docs.
|
523
593
|
|
524
594
|
### Fixed
|
595
|
+
|
525
596
|
- The almost a year old bug where changing the own user's username would reset its avatar has finally been fixed.
|
526
597
|
- 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)
|
527
598
|
- 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.
|
@@ -541,26 +612,31 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
541
612
|
- 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)
|
542
613
|
|
543
614
|
## [2.1.3] - 2016-06-11
|
615
|
+
|
544
616
|
[2.1.3]: https://github.com/discordrb/discordrb/releases/tag/v2.1.3
|
545
617
|
|
546
618
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.2...v2.1.3)
|
547
619
|
|
548
620
|
### Fixed
|
621
|
+
|
549
622
|
- 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)
|
550
623
|
- A mistake in the documentation was fixed ([#140](https://github.com/discordrb/discordrb/issues/140))
|
551
624
|
- 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))
|
552
625
|
- 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))
|
553
626
|
|
554
627
|
## [2.1.2] - 2016-05-29
|
628
|
+
|
555
629
|
[2.1.2]: https://github.com/discordrb/discordrb/releases/tag/v2.1.2
|
556
630
|
|
557
631
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.1...v2.1.2)
|
558
632
|
|
559
633
|
### Added
|
634
|
+
|
560
635
|
- A reader was added (`Bot#awaits`) to read the hash of awaits, so ones that aren't necessary anymore can be deleted.
|
561
636
|
- `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)
|
562
637
|
|
563
638
|
### Fixed
|
639
|
+
|
564
640
|
- A few unresolved links in the documentation were fixed.
|
565
641
|
- The tracking of streamed servers was updated so that very long lists of servers should now all be processed.
|
566
642
|
- 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)
|
@@ -569,20 +645,24 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
569
645
|
- Uncached members in messages are now logged.
|
570
646
|
|
571
647
|
## [2.1.1] - 2016-05-08
|
648
|
+
|
572
649
|
[2.1.1]: https://github.com/discordrb/discordrb/releases/tag/v2.1.1
|
573
650
|
|
574
651
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.0...v2.1.1)
|
575
652
|
|
576
653
|
### Fixed
|
654
|
+
|
577
655
|
- Fixed a caching error that occurred when deleting roles ([#113](https://github.com/discordrb/discordrb/issues/113))
|
578
656
|
- Commands should no longer be triggered with nil authors ([#114](https://github.com/discordrb/discordrb/issues/114))
|
579
657
|
|
580
658
|
## [2.1.0] - 2016-04-30
|
659
|
+
|
581
660
|
[2.1.0]: https://github.com/discordrb/discordrb/releases/tag/v2.1.0
|
582
661
|
|
583
662
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.4...v2.1.0)
|
584
663
|
|
585
664
|
### Added
|
665
|
+
|
586
666
|
- 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))
|
587
667
|
- Members' nicknames can now be set and read (`Member#nick`) and updates to them are being tracked.
|
588
668
|
- Roles now have a `mentionable?` property and a `mention` utility method.
|
@@ -590,20 +670,23 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
590
670
|
- The internal REST rate limit handler was updated:
|
591
671
|
- It now tracks message rate limits server wide to properly handle new bot account rate limits. ([#100](https://github.com/discordrb/discordrb/issues/100))
|
592
672
|
- 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.
|
593
|
-
- Guild sharding is now supported using the optional `shard_id` and `num_shards` to bot initializers. Read about it here: https://github.com/
|
673
|
+
- 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))
|
594
674
|
- 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))
|
595
675
|
- 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))
|
596
676
|
- 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))
|
597
677
|
|
598
678
|
## [2.0.4] - 2016-04-19
|
679
|
+
|
599
680
|
[2.0.4]: https://github.com/discordrb/discordrb/releases/tag/v2.0.4
|
600
681
|
|
601
682
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.3...v2.0.4)
|
602
683
|
|
603
684
|
### Added
|
685
|
+
|
604
686
|
- Added a utility method `Invite#url` ([#86](https://github.com/discordrb/discordrb/issues/86)/[#101](https://github.com/discordrb/discordrb/pull/101), thanks @PoVa)
|
605
687
|
|
606
688
|
### Fixed
|
689
|
+
|
607
690
|
- 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))
|
608
691
|
- Setting avatars should now work again on Windows ([#96](https://github.com/discordrb/discordrb/issues/96))
|
609
692
|
- Message edit events should no longer be raised with nil authors ([#95](https://github.com/discordrb/discordrb/issues/95))
|
@@ -612,27 +695,32 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
612
695
|
- Fixed some possible problems with heartbeats not being sent with unstable connections
|
613
696
|
|
614
697
|
## [2.0.3] - 2016-04-15
|
698
|
+
|
615
699
|
[2.0.3]: https://github.com/discordrb/discordrb/releases/tag/v2.0.3
|
616
700
|
|
617
701
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.2...v2.0.3)
|
618
702
|
|
619
703
|
### Added
|
704
|
+
|
620
705
|
- All examples now fully use v2 ([#92](https://github.com/discordrb/discordrb/pull/92), thanks @snapcase)
|
621
706
|
- 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)
|
622
707
|
- The log message that occurs when you disconnect from the WebSocket is now more compact ([#90](https://github.com/discordrb/discordrb/issues/90))
|
623
708
|
- `Bot#ignored?` now exists to check whether a user is ignored
|
624
709
|
|
625
710
|
### Fixed
|
711
|
+
|
626
712
|
- A problem where getting channel history would sometimes cause an exception has been fixed ([#88](https://github.com/discordrb/discordrb/issues/88))
|
627
713
|
- `split_message` should now behave correctly in a specific edge case ([#85](https://github.com/discordrb/discordrb/pull/85), thanks @AnhNhan)
|
628
714
|
- DCA playback should no longer cause an error when playback ends due to a specific reason
|
629
715
|
|
630
716
|
## [2.0.2] - 2016-04-10
|
717
|
+
|
631
718
|
[2.0.2]: https://github.com/discordrb/discordrb/releases/tag/v2.0.2
|
632
719
|
|
633
720
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.1...v2.0.2)
|
634
721
|
|
635
722
|
### Added
|
723
|
+
|
636
724
|
- Added `Server#text_channels` and `#voice_channels` ([#79](https://github.com/discordrb/discordrb/issues/79))
|
637
725
|
- Added `Server#online_users` ([#80](https://github.com/discordrb/discordrb/issues/80))
|
638
726
|
- Added `Member#role?` ([#83](https://github.com/discordrb/discordrb/issues/83))
|
@@ -640,6 +728,7 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
640
728
|
- `Bot#send_message` can now take channel objects as well as the ID
|
641
729
|
|
642
730
|
### Fixed
|
731
|
+
|
643
732
|
- Removing the bot from a server will no longer result in a gateway message error
|
644
733
|
- Fixed an exception raised if a previously unavailable guild goes online after the stream timeout
|
645
734
|
- `server_create` will no longer be raised for newly available guilds
|
@@ -647,62 +736,72 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
647
736
|
- Fixed an error where rarely a server's owner wouldn't be initialized correctly
|
648
737
|
|
649
738
|
## [2.0.1] - 2016-04-10
|
739
|
+
|
650
740
|
[2.0.1]: https://github.com/discordrb/discordrb/releases/tag/v2.0.1
|
651
741
|
|
652
742
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.0...v2.0.1)
|
653
743
|
|
654
744
|
### Added
|
745
|
+
|
655
746
|
- Added some more examples ([#75](https://github.com/discordrb/discordrb/pull/75), thanks @greenbigfrog)
|
656
747
|
- Users can now be ignored from messages at gateway level (`Bot#ignore_user`, `Bot#unignore_user`)
|
657
748
|
- `Member#add_role` and `Member#remove_role` were re-added from User - they were missing before
|
658
749
|
|
659
750
|
### Fixed
|
751
|
+
|
660
752
|
- Fixed some typos in the documentation
|
661
753
|
- If a server is actually unavailable it will no longer spam the console with timeout messages
|
662
754
|
- 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.
|
663
755
|
- Fixed a bug where playing something right after connecting to voice would sometimes cause the encryption key to not be set
|
664
756
|
|
665
757
|
## [2.0.0] - 2016-04-08
|
758
|
+
|
666
759
|
[2.0.0]: https://github.com/discordrb/discordrb/releases/tag/v2.0.0
|
667
760
|
|
668
761
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.8.1...v2.0.0)
|
669
762
|
|
670
763
|
### Added
|
764
|
+
|
671
765
|
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.
|
672
766
|
|
673
767
|
- **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:
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
768
|
+
|
769
|
+
```rb
|
770
|
+
# Previously
|
771
|
+
bot = Discordrb::Bot.new 'email@example.com', 'hunter2', true
|
772
|
+
|
773
|
+
# Now
|
774
|
+
bot = Discordrb::Bot.new email: 'email@example.com', password: 'hunter2', log_mode: :debug
|
775
|
+
```
|
776
|
+
|
777
|
+
```rb
|
778
|
+
# Previously
|
779
|
+
bot = Discordrb::Bot.new :token, 'TOKEN HERE'
|
780
|
+
|
781
|
+
# Now
|
782
|
+
bot = Discordrb::Bot.new token: 'TOKEN HERE', application_id: 163456789123456789
|
783
|
+
```
|
784
|
+
|
785
|
+
```rb
|
786
|
+
# Previously
|
787
|
+
bot = Discordrb::Commands::CommandBot.new :token, 'TOKEN HERE', '!', nil, {advanced_functionality: false}
|
788
|
+
|
789
|
+
# Now
|
790
|
+
bot = Discordrb::Commands::CommandBot.new token: 'TOKEN HERE', application_id: 163456789123456789, prefix: '!', advanced_functionality: false
|
791
|
+
```
|
792
|
+
|
793
|
+
- 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.
|
794
|
+
- **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).
|
795
|
+
- **All previously deprecated methods were removed.** This includes:
|
796
|
+
- `Server#afk_channel_id=` (use `afk_channel=`, it works with the ID too)
|
797
|
+
- `Channel#is_private` (use `private?` instead, it's more reliable with edge cases like Twitch subscriber-only channels)
|
798
|
+
- `Bot#find` (use `find_channel` instead, it does the exact same thing without confusion with `find_user`)
|
799
|
+
- **`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.
|
800
|
+
- **`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.
|
801
|
+
- **`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)
|
802
|
+
- 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.
|
803
|
+
- 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:
|
804
|
+
|
706
805
|
```rb
|
707
806
|
require 'discordrb'
|
708
807
|
require 'discordrb/light'
|
@@ -710,31 +809,33 @@ require 'discordrb/light'
|
|
710
809
|
bot = Discordrb::Light::LightBot.new 'token here'
|
711
810
|
puts bot.profile.username
|
712
811
|
```
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
812
|
+
|
813
|
+
- 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.
|
814
|
+
- 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.
|
815
|
+
- The new version of the Discord gateway (v4) is supported and used by default. This should bring more stability and possibly slight performance improvements.
|
816
|
+
- Some older v3 features that weren't supported before are now:
|
817
|
+
- Compressed ready packets (should decrease network overhead for very large bots)
|
818
|
+
- 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.
|
819
|
+
- Requests will now automatically be retried if a 502 (cloudflare error) is received.
|
820
|
+
- `MessageEditEvent`s now have a whole message instead of just the ID to allow for checking the content of edited messages.
|
821
|
+
- `Message`s now have an `attachments` array with files attached to the message.
|
822
|
+
- `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.
|
823
|
+
- `Bot#find_channel` can now parse channel mentions and search for specific types of channels (text or voice).
|
824
|
+
- `Server#create_channel` can now create voice channels.
|
825
|
+
- A utility function `User#distinct` was added to get the distinct representation of a user (i.e. name + discrim, for example "meew0#9811")
|
826
|
+
- The `User#discriminator` attribute now has more aliases (`#tag`, `#discord_tag`, `#discrim`)
|
827
|
+
- `Permission` objects can now be created or set even without a role writer, useful to quickly get byte representations of permissions
|
828
|
+
- Permission overwrites can now be defined more easily using the utility method `Channel#define_overwrite`
|
829
|
+
- `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))
|
830
|
+
- The `:with_text` event attribute is now aliased to `:exact_text` ([#65](https://github.com/discordrb/discordrb/issues/65))
|
831
|
+
- Server icons (`Server#icon=`) can now be set just like avatars (`Profile#avatar=`)
|
832
|
+
- Lots of comments were added to the examples and some bugs fixed
|
833
|
+
- The overall performance and memory usage was improved, especially on Ruby 2.3 (using the new frozen string literal comment)
|
834
|
+
- The documentation was slightly improved.
|
735
835
|
|
736
836
|
### Fixed
|
737
|
-
|
837
|
+
|
838
|
+
- 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.
|
738
839
|
- **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.
|
739
840
|
- Permission calculation (`User#permission?`) has been thoroughly rewritten and should now account for edge cases like server owners and Manage Permissions.
|
740
841
|
- 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.
|
@@ -744,456 +845,552 @@ puts bot.profile.username
|
|
744
845
|
- Command bots now obey `should_parse_self`
|
745
846
|
|
746
847
|
## [1.8.1] - 2016-03-11
|
848
|
+
|
747
849
|
[1.8.1]: https://github.com/discordrb/discordrb/releases/tag/v1.8.1
|
748
850
|
|
749
851
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.8.0...v1.8.1)
|
750
852
|
|
751
853
|
### Fixed
|
752
|
-
|
854
|
+
|
855
|
+
- 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.
|
753
856
|
|
754
857
|
## [1.8.0] - 2016-03-11
|
858
|
+
|
755
859
|
[1.8.0]: https://github.com/discordrb/discordrb/releases/tag/v1.8.0
|
756
860
|
|
757
861
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.5...v1.8.0)
|
758
862
|
|
759
863
|
### Added
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
864
|
+
|
865
|
+
- The built-in logger has been somewhat redone.
|
866
|
+
- 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.
|
867
|
+
- It now supports more things than just `debug`, there's also `warn`, `error`, `good`, `info`, `in`, and `out`.
|
868
|
+
- You now have finer control over what gets output, using `Discordrb::LOGGER.mode=` which accepts one of `:debug`, `:verbose`, `:normal`, `:quiet`, `:silent`.
|
869
|
+
- 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.
|
870
|
+
- DCA playback now supports `DCA1`.
|
871
|
+
- All data classes (now generalized using the `IDObject` mixin) have a `creation_date` parameter that specifies when the object was created.
|
872
|
+
- `Channel#mention` was added that mentions a channel analogous to `User#mention`.
|
873
|
+
- The aliases `tag` and `discord_tag` have been added to the discriminator because that's what Discord calls them now.
|
769
874
|
|
770
875
|
### Fixed
|
771
|
-
|
772
|
-
|
773
|
-
|
876
|
+
|
877
|
+
- A problem some users had where voice playback would leak FFmpeg processes has been fixed.
|
878
|
+
- The VWS internal thread now has a name in debug messages (`vws-i`)
|
879
|
+
- Users' voice channels should now always be set if they are in one
|
774
880
|
|
775
881
|
## [1.7.5] - 2016-03-03
|
882
|
+
|
776
883
|
[1.7.5]: https://github.com/discordrb/discordrb/releases/tag/v1.7.5
|
777
884
|
|
778
885
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.4...v1.7.5)
|
779
886
|
|
780
887
|
### Changed
|
781
|
-
|
888
|
+
|
889
|
+
- `Channel#send_message` and `Bot#send_message` now have an extra `tts` parameter (false by default) to specify whether the message should use TTS.
|
782
890
|
|
783
891
|
### Fixed
|
784
|
-
|
785
|
-
|
892
|
+
|
893
|
+
- Attempting to `p` a data class, especially a `User` or `Profile`, should no longer lock up the interpreter due to very deep recursion.
|
894
|
+
- Manual TTS using `API.send_message` will now work correctly.
|
786
895
|
|
787
896
|
## [1.7.4] - 2016-02-28
|
897
|
+
|
788
898
|
[1.7.4]: https://github.com/discordrb/discordrb/releases/tag/v1.7.4
|
789
899
|
|
790
900
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.3...v1.7.4)
|
791
901
|
|
792
902
|
### Added
|
793
|
-
|
794
|
-
|
903
|
+
|
904
|
+
- Added methods `Channel#text?` and `Channel#voice?` to check a channel's type.
|
905
|
+
- Frequently allocated strings have been turned into symbols or frozen constants, this should improve performance slightly.
|
795
906
|
|
796
907
|
### Fixed
|
797
|
-
|
798
|
-
|
799
|
-
|
908
|
+
|
909
|
+
- `VoiceBot#destroy` will now properly disconnect you and should no longer cause segfaults.
|
910
|
+
- Fixed a bug where you couldn't set any settings on a role created using `Server#create_role`.
|
911
|
+
- Fixed `Profile#avatar=` doing absolutely nothing.
|
800
912
|
|
801
913
|
## [1.7.3] - 2016-02-27
|
914
|
+
|
802
915
|
[1.7.3]: https://github.com/discordrb/discordrb/releases/tag/v1.7.3
|
803
916
|
|
804
917
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.2...v1.7.3)
|
805
918
|
|
806
919
|
### Added
|
807
|
-
|
808
|
-
|
920
|
+
|
921
|
+
- The server banlist can now be accessed more nicely using `Server#bans`.
|
922
|
+
- 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.
|
809
923
|
|
810
924
|
## [1.7.2] - 2016-02-25
|
925
|
+
|
811
926
|
[1.7.2]: https://github.com/discordrb/discordrb/releases/tag/v1.7.2
|
812
927
|
|
813
928
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.1...v1.7.2)
|
814
929
|
|
815
930
|
### Changed
|
816
|
-
|
817
|
-
|
931
|
+
|
932
|
+
- The `bot` object can now be read from all events, not just from command ones.
|
933
|
+
- 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.
|
818
934
|
|
819
935
|
## [1.7.1] - 2016-02-23
|
936
|
+
|
820
937
|
[1.7.1]: https://github.com/discordrb/discordrb/releases/tag/v1.7.1
|
821
938
|
|
822
939
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.0...v1.7.1)
|
823
940
|
|
824
941
|
### Added
|
825
|
-
|
942
|
+
|
943
|
+
- 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.)
|
826
944
|
|
827
945
|
### Fixed
|
828
|
-
|
829
|
-
|
830
|
-
|
946
|
+
|
947
|
+
- The tokens will now be verified correctly when obtained from the cache. (I messed up last time)
|
948
|
+
- Events of the same type in different containers will now be merged correctly when including both containers.
|
949
|
+
- 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)
|
831
950
|
|
832
951
|
## [1.7.0] - 2016-02-23
|
952
|
+
|
833
953
|
[1.7.0]: https://github.com/discordrb/discordrb/releases/tag/v1.7.0
|
834
954
|
|
835
955
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.6...v1.7.0)
|
836
956
|
|
837
957
|
### Added
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
958
|
+
|
959
|
+
- **`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.
|
960
|
+
- 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.
|
961
|
+
- Events and commands can now be thoroughly modularized using a system I call 'containers'. (TODO: Add a tutorial here later)
|
962
|
+
- Support for the latest API changes:
|
963
|
+
- `Server.leave` does something different than `Server.delete`
|
964
|
+
- The WebSocket connection now uses version 3 of the protocol
|
965
|
+
- 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)
|
966
|
+
- 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.
|
967
|
+
- 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.)
|
968
|
+
- [`Server#members`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Amembers) is now aliased to `users`.
|
969
|
+
- 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.
|
970
|
+
- 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.
|
971
|
+
- Some more specific error classes have been added to replace the RestClient generic ones.
|
972
|
+
- Quickly sending a message using the `event << 'text'` syntax now works in every type of message event, not just commands.
|
973
|
+
- 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.
|
974
|
+
- 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).
|
975
|
+
- 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)
|
976
|
+
- Connecting to the WebSocket now uses an exponential falloff system so we don't spam Discord with requests anymore.
|
977
|
+
- Debug timestamps are now accurate to milliseconds.
|
857
978
|
|
858
979
|
### Fixed
|
859
|
-
|
860
|
-
|
980
|
+
|
981
|
+
- The token cacher will now detect whether a cached token has been invalidated due to a password change.
|
982
|
+
- `break`ing from an event or command will no longer spew `LocalJumpError`s to the console.
|
861
983
|
|
862
984
|
## [1.6.6] - 2016-02-13
|
985
|
+
|
863
986
|
[1.6.6]: https://github.com/discordrb/discordrb/releases/tag/v1.6.6
|
864
987
|
|
865
988
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.5...v1.6.6)
|
866
989
|
|
867
990
|
### Fixed
|
868
|
-
|
869
|
-
|
991
|
+
|
992
|
+
- Fixed a problem that would cause an incompatibility with Ruby 2.1
|
993
|
+
- Fixed servers sometimes containing duplicate members
|
870
994
|
|
871
995
|
## [1.6.5] - 2016-02-12
|
996
|
+
|
872
997
|
[1.6.5]: https://github.com/discordrb/discordrb/releases/tag/v1.6.5
|
873
998
|
|
874
999
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.4...v1.6.5)
|
875
1000
|
|
876
1001
|
### Changed
|
877
|
-
|
1002
|
+
|
1003
|
+
- 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).
|
878
1004
|
|
879
1005
|
## [1.6.4] - 2016-02-10
|
1006
|
+
|
880
1007
|
[1.6.4]: https://github.com/discordrb/discordrb/releases/tag/v1.6.4
|
881
1008
|
|
882
1009
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.3...v1.6.4)
|
883
1010
|
|
884
1011
|
### Fixed
|
885
|
-
|
1012
|
+
|
1013
|
+
- Fixed a bug that made the joining of servers using an invite impossible.
|
886
1014
|
|
887
1015
|
## [1.6.3] - 2016-02-08
|
1016
|
+
|
888
1017
|
[1.6.3]: https://github.com/discordrb/discordrb/releases/tag/v1.6.3
|
889
1018
|
|
890
1019
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.2...v1.6.3)
|
891
1020
|
|
892
1021
|
### Fixed
|
893
|
-
|
1022
|
+
|
1023
|
+
- Fixed a bug that prevented the banning of users over the API
|
894
1024
|
|
895
1025
|
## [1.6.2] - 2016-02-06
|
1026
|
+
|
896
1027
|
[1.6.2]: https://github.com/discordrb/discordrb/releases/tag/v1.6.2
|
897
1028
|
|
898
1029
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.1...v1.6.2)
|
899
1030
|
|
900
1031
|
### Fixed
|
901
|
-
|
1032
|
+
|
1033
|
+
- 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.
|
902
1034
|
|
903
1035
|
## [1.6.1] - 2016-02-04
|
1036
|
+
|
904
1037
|
[1.6.1]: https://github.com/discordrb/discordrb/releases/tag/v1.6.1
|
905
1038
|
|
906
1039
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.0...v1.6.1)
|
907
1040
|
|
908
1041
|
### Changed
|
909
|
-
|
1042
|
+
|
1043
|
+
- 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.
|
910
1044
|
|
911
1045
|
### Fixed
|
912
|
-
|
1046
|
+
|
1047
|
+
- Token cache files with invalid JSON syntax will no longer crash the bot at login.
|
913
1048
|
|
914
1049
|
## [1.6.0] - 2016-02-01
|
1050
|
+
|
915
1051
|
[1.6.0]: https://github.com/discordrb/discordrb/releases/tag/v1.6.0
|
916
1052
|
|
917
1053
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.4...v1.6.0)
|
918
1054
|
|
919
1055
|
### Added
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
1056
|
+
|
1057
|
+
- 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/).
|
1058
|
+
- 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.
|
1059
|
+
- The [new library comparison](https://discordapi.com/unofficial/comparison.html) is now fully supported, barring voice receive and multi-send: (#39)
|
1060
|
+
- `bot.invite` will create an `Invite` object from a code containing information about it.
|
1061
|
+
- `server.move(user, channel)` will move a user to a different voice channel.
|
1062
|
+
- 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.
|
1063
|
+
- The events `bot.user_ban` and `bot.user_unban` are now available for users getting banned/unbanned from servers.
|
1064
|
+
- 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.
|
1065
|
+
- Discord server ownership transfer is now implemented using the writer `server.owner=`. (#41)
|
1066
|
+
- `CommandBot`s can now have command aliases by simply using an array of symbols as the command name.
|
1067
|
+
- 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.)
|
1068
|
+
- Tokens will no longer appear in debug output, so you're safe sending output logs to other people.
|
1069
|
+
- 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`.
|
1070
|
+
- 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)
|
1071
|
+
- The writer `server.afk_channel_id=` is now deprecated as its functionality is now covered by `server.afk_channel=`.
|
1072
|
+
- A new reader `user.avatar_url` was added that returns the full image URL to a user's avatar.
|
1073
|
+
- To avoid confusion with `avatar_url`, the reader `user.avatar` was renamed to `avatar_id`. (`user.avatar` still exists but is now deprecated.)
|
1074
|
+
- Symbols are now used instead of strings as hash keys in all methods that send JSON data to somewhere. This might improve performance slightly.
|
938
1075
|
|
939
1076
|
### Fixed
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
1077
|
+
|
1078
|
+
- Fixed the reader `server.afk_channel_id` not containing a value sometimes.
|
1079
|
+
- 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.
|
1080
|
+
- 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.
|
1081
|
+
- The `inviter` of an `Invite` will now be `nil` instead of causing an exception when it doesn't exist in the invite data.
|
944
1082
|
|
945
1083
|
## [1.5.4] - 2016-01-16
|
1084
|
+
|
946
1085
|
[1.5.4]: https://github.com/discordrb/discordrb/releases/tag/v1.5.4
|
947
1086
|
|
948
1087
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.3...v1.5.4)
|
949
1088
|
|
950
1089
|
### Changed
|
951
|
-
|
1090
|
+
|
1091
|
+
- 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)
|
952
1092
|
|
953
1093
|
### Fixed
|
954
|
-
|
955
|
-
|
1094
|
+
|
1095
|
+
- Voice volume can now be properly set when using avconv (#37, thanks @purintai)
|
1096
|
+
- `websocket-client-simple`, which is required for voice, is now specified in the dependencies.
|
956
1097
|
|
957
1098
|
## [1.5.3] - 2016-01-11
|
1099
|
+
|
958
1100
|
[1.5.3]: https://github.com/discordrb/discordrb/releases/tag/v1.5.3
|
959
1101
|
|
960
1102
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.2...v1.5.3)
|
961
1103
|
|
962
1104
|
### Added
|
963
|
-
|
964
|
-
|
1105
|
+
|
1106
|
+
- 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)
|
1107
|
+
- 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)
|
965
1108
|
|
966
1109
|
## [1.5.2] - 2016-01-11
|
1110
|
+
|
967
1111
|
[1.5.2]: https://github.com/discordrb/discordrb/releases/tag/v1.5.2
|
968
1112
|
|
969
1113
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.1...v1.5.2)
|
970
1114
|
|
971
1115
|
### Added
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
1116
|
+
|
1117
|
+
- `bot.voice_connect` can now use a channel ID directly.
|
1118
|
+
- A reader `bot.volume` now exists for the corresponding writer.
|
1119
|
+
- The attribute `bot.encoder.use_avconv` was added that makes the bot use avconv instead of ffmpeg (for those on Ubuntu 14.x)
|
1120
|
+
- The PBKDF2 iteration count for token caching was increased to 300,000 for extra security.
|
976
1121
|
|
977
1122
|
### Fixed
|
978
|
-
|
979
|
-
|
1123
|
+
|
1124
|
+
- Fix a bug where `play_file` wouldn't properly accept string file paths (#36, thanks @purintai)
|
1125
|
+
- Fix a concurrency issue where `VoiceBot` would try to read from nil
|
980
1126
|
|
981
1127
|
## [1.5.1] - 2016-01-10
|
1128
|
+
|
982
1129
|
[1.5.1]: https://github.com/discordrb/discordrb/releases/tag/v1.5.1
|
983
1130
|
|
984
1131
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.0...v1.5.1)
|
985
1132
|
|
986
1133
|
### Added
|
987
|
-
|
1134
|
+
|
1135
|
+
- 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`.
|
988
1136
|
|
989
1137
|
## [1.5.0] - 2016-01-10
|
1138
|
+
|
990
1139
|
[1.5.0]: https://github.com/discordrb/discordrb/releases/tag/v1.5.0
|
991
1140
|
|
992
1141
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.8...v1.5.0)
|
993
1142
|
|
994
1143
|
### Added
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1144
|
+
|
1145
|
+
- Voice support: discordrb can now connect to voice using `bot.voice_connect` and do the following things:
|
1146
|
+
- Play files and URLs using `VoiceBot.play_file`
|
1147
|
+
- Play arbitrary streams using `VoiceBot.play_io`
|
1148
|
+
- Set the volume of future playbacks using `VoiceBot.volume=`
|
1149
|
+
- Pause and resume playback (`VoiceBot.pause` and `VoiceBot.continue`)
|
1150
|
+
- 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.
|
1001
1151
|
|
1002
1152
|
### Fixed
|
1003
|
-
|
1004
|
-
|
1153
|
+
|
1154
|
+
- Some latent ID casting errors were fixed - those would probably never have been noticed anyway, but they're fixed now.
|
1155
|
+
- `Bot.parse_mention` now works, it didn't work at all previously
|
1005
1156
|
|
1006
1157
|
## [1.4.8] - 2016-01-06
|
1158
|
+
|
1007
1159
|
[1.4.8]: https://github.com/discordrb/discordrb/releases/tag/v1.4.8
|
1008
1160
|
|
1009
1161
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.7...v1.4.8)
|
1010
1162
|
|
1011
1163
|
### Added
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1164
|
+
|
1165
|
+
- The `User` class now has the methods `add_role` and `remove_role` which add a role to a user and remove it, respectively.
|
1166
|
+
- All data classes now have a useful `==` implementation.
|
1167
|
+
- **The `Game` class and all references to it were removed**. Games are now only identified by their name.
|
1015
1168
|
|
1016
1169
|
### Fixed
|
1017
|
-
|
1170
|
+
|
1171
|
+
- When a role is deleted, the ID is now obtained correctly. (#30)
|
1018
1172
|
|
1019
1173
|
## [1.4.7] - 2016-01-03
|
1174
|
+
|
1020
1175
|
[1.4.7]: https://github.com/discordrb/discordrb/releases/tag/v1.4.7
|
1021
1176
|
|
1022
1177
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.6...v1.4.7)
|
1023
1178
|
|
1024
1179
|
### Added
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1180
|
+
|
1181
|
+
- Presence event handling is now divided into two separate events; `PresenceEvent` to handle online/offline/idle statuses and `PlayingEvent` to handle users playing games.
|
1182
|
+
- 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.
|
1183
|
+
- `Message` now has a useful `to_s` method that just returns the content.
|
1028
1184
|
|
1029
1185
|
### Fixed
|
1030
|
-
|
1186
|
+
|
1187
|
+
- The `TypingEvent` `user` property is now initialized correctly (#29, thanks @purintai)
|
1031
1188
|
|
1032
1189
|
## [1.4.6] - 2015-12-25
|
1190
|
+
|
1033
1191
|
[1.4.6]: https://github.com/discordrb/discordrb/releases/tag/v1.4.6
|
1034
1192
|
|
1035
1193
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.4...v1.4.6)
|
1036
1194
|
|
1037
1195
|
### Fixed
|
1038
|
-
|
1196
|
+
|
1197
|
+
- The `user` and `server` properties of `PresenceEvent` are now initialized correctly.
|
1039
1198
|
|
1040
1199
|
## 1.4.5
|
1200
|
+
|
1041
1201
|
<!-- This was never tagged in the git repo -->
|
1202
|
+
|
1042
1203
|
### Changed
|
1043
|
-
|
1044
|
-
|
1204
|
+
|
1205
|
+
- The `Bot.game` property can now be set to an arbitrary string.
|
1206
|
+
- Discord mentions are handled in the old way again, after Discord reverted an API change.
|
1045
1207
|
|
1046
1208
|
## [1.4.4] - 2015-12-18
|
1209
|
+
|
1047
1210
|
[1.4.4]: https://github.com/discordrb/discordrb/releases/tag/v1.4.4
|
1048
1211
|
|
1049
1212
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.3...v1.4.4)
|
1050
1213
|
|
1051
1214
|
### Added
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1215
|
+
|
1216
|
+
- Add `Server.leave_server` as an alias for `delete_server`
|
1217
|
+
- Use the new Discord mention format (mentions array). **Reverted in 1.4.5**
|
1218
|
+
- Discord rate limited API calls are now handled correctly - discordrb will try again after the specified time.
|
1219
|
+
- Debug logging is now handled by a separate `Logger` class
|
1056
1220
|
|
1057
1221
|
### Fixed
|
1058
|
-
|
1059
|
-
|
1222
|
+
|
1223
|
+
- Message timestamps are now parsed correctly.
|
1224
|
+
- The quickadders for awaits (`User.await`, `Channel.await` etc.) now add the correct awaits.
|
1060
1225
|
|
1061
1226
|
## [1.4.3] - 2015-12-11
|
1227
|
+
|
1062
1228
|
[1.4.3]: https://github.com/discordrb/discordrb/releases/tag/v1.4.3
|
1063
1229
|
|
1064
1230
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.2...v1.4.3)
|
1065
1231
|
|
1066
1232
|
### Added
|
1067
|
-
|
1233
|
+
|
1234
|
+
- Added a method `Bot.find_user` analogous to `Bot.find`.
|
1068
1235
|
|
1069
1236
|
### Fixed
|
1070
|
-
|
1237
|
+
|
1238
|
+
- Remove a leftover debug line (#23, thanks @VxJasonxV)
|
1071
1239
|
|
1072
1240
|
## [1.4.2] - 2015-12-10
|
1241
|
+
|
1073
1242
|
[1.4.2]: https://github.com/discordrb/discordrb/releases/tag/v1.4.2
|
1074
1243
|
|
1075
1244
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.1...v1.4.2)
|
1076
1245
|
|
1077
1246
|
### Changed
|
1078
|
-
|
1247
|
+
|
1248
|
+
- discordrb will now send a user agent in the format requested by the Discord devs.
|
1079
1249
|
|
1080
1250
|
## [1.4.1] - 2015-12-07
|
1251
|
+
|
1081
1252
|
[1.4.1]: https://github.com/discordrb/discordrb/releases/tag/v1.4.1
|
1082
1253
|
|
1083
1254
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.0...v1.4.1)
|
1084
1255
|
|
1085
1256
|
### Fixed
|
1086
|
-
|
1087
|
-
|
1257
|
+
|
1258
|
+
- Empty messages will now never be sent
|
1259
|
+
- The command-not-found message in `CommandBot` can now be disabled properly
|
1088
1260
|
|
1089
1261
|
## [1.4.0] - 2015-12-04
|
1262
|
+
|
1090
1263
|
[1.4.0]: https://github.com/discordrb/discordrb/releases/tag/v1.4.0
|
1091
1264
|
|
1092
1265
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.12...v1.4.0)
|
1093
1266
|
|
1094
1267
|
### Added
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1268
|
+
|
1269
|
+
- 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).
|
1270
|
+
- discordrb now supports everything on the Discord API comparison, except for voice (see also #22)
|
1271
|
+
- Roles can now be created, edited and deleted and their permissions modified.
|
1272
|
+
- There is now a method to get a channel's message history.
|
1273
|
+
- The bot's user profile can now be edited.
|
1274
|
+
- Servers can now be created, edited and deleted.
|
1275
|
+
- The user can now display a "typing" message in a channel.
|
1276
|
+
- Invites can now be created and deleted, and an `Invite` class was made to represent them.
|
1277
|
+
- Command and event handling is now threaded, with each command/event handler execution in a separate thread.
|
1278
|
+
- Debug messages now specify the current thread's name.
|
1279
|
+
- discordrb now handles created/updated/deleted servers properly with events added to handle them.
|
1280
|
+
- The list of games handled by Discord will now be updated automatically.
|
1107
1281
|
|
1108
1282
|
### Fixed
|
1109
|
-
|
1283
|
+
|
1284
|
+
- Fixed a bug where command handling would crash if the command didn't exist.
|
1110
1285
|
|
1111
1286
|
## [1.3.12] - 2015-11-30
|
1287
|
+
|
1112
1288
|
[1.3.12]: https://github.com/discordrb/discordrb/releases/tag/v1.3.12
|
1113
1289
|
|
1114
1290
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.11...v1.3.12)
|
1115
1291
|
|
1116
1292
|
### Added
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1293
|
+
|
1294
|
+
- 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.
|
1295
|
+
- `User.bot?` and `Message.from_bot?` were implemented to check whether the user is the bot or the message was sent by it.
|
1296
|
+
- Add an event for private messages specifically (`Bot.pm` and `PrivateMessageEvent`)
|
1120
1297
|
|
1121
1298
|
### Fixed
|
1122
|
-
|
1299
|
+
|
1300
|
+
- Fix the `MessageEvent` attribute that checks whether the message is from the bot not working at all.
|
1123
1301
|
|
1124
1302
|
## [1.3.11] - 2015-11-29
|
1303
|
+
|
1125
1304
|
[1.3.11]: https://github.com/discordrb/discordrb/releases/tag/v1.3.11
|
1126
1305
|
|
1127
1306
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.10...v1.3.11)
|
1128
1307
|
|
1129
1308
|
### Added
|
1130
|
-
|
1309
|
+
|
1310
|
+
- Add a user selector (`:bot`) that is usable in the `from:` `MessageEvent` attribute to check whether the message was sent by a bot.
|
1131
1311
|
|
1132
1312
|
### Fixed
|
1133
|
-
|
1313
|
+
|
1314
|
+
- `Channel.private?` now checks for the server being nil instead of the `is_private` attribute provided by Discord as the latter is unreliable. (wtf)
|
1134
1315
|
|
1135
1316
|
## [1.3.10] - 2015-11-28
|
1317
|
+
|
1136
1318
|
[1.3.10]: https://github.com/discordrb/discordrb/releases/tag/v1.3.10
|
1137
1319
|
|
1138
1320
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.9...v1.3.10)
|
1139
1321
|
|
1140
1322
|
### Added
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1323
|
+
|
1324
|
+
- Add a method `Channel.private?` to check for a PM channel
|
1325
|
+
- Add a `MessageEvent` attribute (`:private`) to check whether a message was sent in a PM channel
|
1326
|
+
- Add various aliases to `MessageEvent` attributes
|
1327
|
+
- Allow regexes to check for strings in `MessageEvent` attributes
|
1145
1328
|
|
1146
1329
|
### Fixed
|
1147
|
-
|
1330
|
+
|
1331
|
+
- 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
|
1148
1332
|
|
1149
1333
|
## [1.3.9] - 2015-11-27
|
1334
|
+
|
1150
1335
|
[1.3.9]: https://github.com/discordrb/discordrb/releases/tag/v1.3.9
|
1151
1336
|
|
1152
1337
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.8...v1.3.9)
|
1153
1338
|
|
1154
1339
|
### Added
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1340
|
+
|
1341
|
+
- Add awaits, a powerful way to add temporary event handlers.
|
1342
|
+
- Add a `Bot.find` method to fuzzy-search for channels.
|
1343
|
+
- Add methods to kick, ban and unban users.
|
1158
1344
|
|
1159
1345
|
### Fixed
|
1160
|
-
|
1161
|
-
|
1346
|
+
|
1347
|
+
- Permission overrides now work correctly for private channels (i. e. they don't exist at all)
|
1348
|
+
- Users joining and leaving servers are now handled correctly.
|
1162
1349
|
|
1163
1350
|
## [1.3.8] - 2015-11-12
|
1351
|
+
|
1164
1352
|
[1.3.8]: https://github.com/discordrb/discordrb/releases/tag/v1.3.8
|
1165
1353
|
|
1166
1354
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.7...v1.3.8)
|
1167
1355
|
|
1168
1356
|
### Added
|
1169
|
-
|
1357
|
+
|
1358
|
+
- Added `Bot.users` and `Bot.servers` readers to get the list of users and servers.
|
1170
1359
|
|
1171
1360
|
### Fixed
|
1172
|
-
|
1361
|
+
|
1362
|
+
- 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)
|
1173
1363
|
|
1174
1364
|
## [1.3.7] - 2015-11-07
|
1365
|
+
|
1175
1366
|
[1.3.7]: https://github.com/discordrb/discordrb/releases/tag/v1.3.7
|
1176
1367
|
|
1177
1368
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.6...v1.3.7)
|
1178
1369
|
|
1179
1370
|
### Fixed
|
1180
|
-
|
1371
|
+
|
1372
|
+
- Fix the command bot being included wrong, which caused crashes upon startup.
|
1181
1373
|
|
1182
1374
|
## [1.3.6] - 2015-11-07
|
1375
|
+
|
1183
1376
|
[1.3.6]: https://github.com/discordrb/discordrb/releases/tag/v1.3.6
|
1184
1377
|
|
1185
1378
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.5...v1.3.6)
|
1186
1379
|
|
1187
1380
|
### Added
|
1188
|
-
|
1381
|
+
|
1382
|
+
- The bot can now be stopped from the script using the new method `Bot.stop`.
|
1189
1383
|
|
1190
1384
|
### Fixed
|
1191
|
-
|
1385
|
+
|
1386
|
+
- Fix some wrong file requires which caused crashes sometimes.
|
1192
1387
|
|
1193
1388
|
## [1.3.5] - 2015-11-07
|
1389
|
+
|
1194
1390
|
[1.3.5]: https://github.com/discordrb/discordrb/releases/tag/v1.3.5
|
1195
1391
|
|
1196
1392
|
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.4...v1.3.5)
|
1197
1393
|
|
1198
1394
|
### Added
|
1199
|
-
|
1395
|
+
|
1396
|
+
- The bot can now be run asynchronously using `Bot.run(:async)` to do further initialization after the bot was started.
|