discordrb 3.1.1 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of discordrb might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.circleci/config.yml +126 -0
- data/.codeclimate.yml +16 -0
- data/.github/CONTRIBUTING.md +13 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
- data/.github/pull_request_template.md +37 -0
- data/.gitignore +5 -0
- data/.rubocop.yml +39 -33
- data/.travis.yml +27 -2
- data/.yardopts +1 -1
- data/CHANGELOG.md +808 -208
- data/Gemfile +4 -1
- data/LICENSE.txt +1 -1
- data/README.md +108 -53
- data/Rakefile +14 -1
- data/bin/console +1 -0
- data/bin/travis_build_docs.sh +17 -0
- data/discordrb-webhooks.gemspec +26 -0
- data/discordrb.gemspec +24 -15
- data/lib/discordrb.rb +75 -2
- data/lib/discordrb/allowed_mentions.rb +36 -0
- data/lib/discordrb/api.rb +126 -27
- data/lib/discordrb/api/channel.rb +165 -43
- data/lib/discordrb/api/invite.rb +10 -7
- data/lib/discordrb/api/server.rb +240 -61
- data/lib/discordrb/api/user.rb +26 -24
- data/lib/discordrb/api/webhook.rb +83 -0
- data/lib/discordrb/await.rb +1 -2
- data/lib/discordrb/bot.rb +417 -149
- data/lib/discordrb/cache.rb +42 -10
- data/lib/discordrb/colour_rgb.rb +43 -0
- data/lib/discordrb/commands/command_bot.rb +186 -31
- data/lib/discordrb/commands/container.rb +30 -16
- data/lib/discordrb/commands/parser.rb +102 -47
- data/lib/discordrb/commands/rate_limiter.rb +18 -17
- data/lib/discordrb/container.rb +245 -41
- data/lib/discordrb/data.rb +27 -2511
- data/lib/discordrb/data/activity.rb +264 -0
- data/lib/discordrb/data/application.rb +50 -0
- data/lib/discordrb/data/attachment.rb +56 -0
- data/lib/discordrb/data/audit_logs.rb +345 -0
- data/lib/discordrb/data/channel.rb +849 -0
- data/lib/discordrb/data/embed.rb +251 -0
- data/lib/discordrb/data/emoji.rb +82 -0
- data/lib/discordrb/data/integration.rb +83 -0
- data/lib/discordrb/data/invite.rb +137 -0
- data/lib/discordrb/data/member.rb +297 -0
- data/lib/discordrb/data/message.rb +334 -0
- data/lib/discordrb/data/overwrite.rb +102 -0
- data/lib/discordrb/data/profile.rb +91 -0
- data/lib/discordrb/data/reaction.rb +33 -0
- data/lib/discordrb/data/recipient.rb +34 -0
- data/lib/discordrb/data/role.rb +191 -0
- data/lib/discordrb/data/server.rb +1002 -0
- data/lib/discordrb/data/user.rb +204 -0
- data/lib/discordrb/data/voice_region.rb +45 -0
- data/lib/discordrb/data/voice_state.rb +41 -0
- data/lib/discordrb/data/webhook.rb +145 -0
- data/lib/discordrb/errors.rb +36 -2
- data/lib/discordrb/events/bans.rb +7 -5
- data/lib/discordrb/events/channels.rb +2 -0
- data/lib/discordrb/events/generic.rb +19 -3
- data/lib/discordrb/events/guilds.rb +129 -6
- data/lib/discordrb/events/invites.rb +125 -0
- data/lib/discordrb/events/members.rb +6 -2
- data/lib/discordrb/events/message.rb +86 -36
- data/lib/discordrb/events/presence.rb +23 -16
- data/lib/discordrb/events/raw.rb +47 -0
- data/lib/discordrb/events/reactions.rb +159 -0
- data/lib/discordrb/events/roles.rb +7 -6
- data/lib/discordrb/events/typing.rb +9 -5
- data/lib/discordrb/events/voice_server_update.rb +47 -0
- data/lib/discordrb/events/voice_state_update.rb +29 -9
- data/lib/discordrb/events/webhooks.rb +64 -0
- data/lib/discordrb/gateway.rb +219 -88
- data/lib/discordrb/id_object.rb +39 -0
- data/lib/discordrb/light.rb +1 -1
- data/lib/discordrb/light/integrations.rb +1 -1
- data/lib/discordrb/light/light_bot.rb +1 -1
- data/lib/discordrb/logger.rb +12 -11
- data/lib/discordrb/paginator.rb +57 -0
- data/lib/discordrb/permissions.rb +148 -14
- data/lib/discordrb/version.rb +1 -1
- data/lib/discordrb/voice/encoder.rb +14 -15
- data/lib/discordrb/voice/network.rb +86 -45
- data/lib/discordrb/voice/sodium.rb +96 -0
- data/lib/discordrb/voice/voice_bot.rb +52 -40
- data/lib/discordrb/webhooks.rb +12 -0
- data/lib/discordrb/websocket.rb +2 -2
- metadata +137 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b44116c97ea561cc141eddb374d560c3f2ca256c0b13cde7c6fe42479a42d9e3
|
4
|
+
data.tar.gz: 9e8a42e010851af16ca3a1a922a268559dbafdcb66bb3e6824f68dbcea1759aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e025470a1b899d0494827e5f62602d18d2e96a6ddeec4076780856119c07c78cb3c7da71c14d4110572560d4992b1ae2cba8e6b6002d17abbb9fd2e2220c28d5
|
7
|
+
data.tar.gz: 05dd2b712800adbd8d14b659edf59750d31bad386a5a910a23c2ae447161dd3b68c42a48d28a664a9108c64f3ded641e102516a0a93a8f25b84a736f49f6b632
|
@@ -0,0 +1,126 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
commands:
|
4
|
+
setup-env:
|
5
|
+
description: Sets up the testing environment
|
6
|
+
steps:
|
7
|
+
- run:
|
8
|
+
name: Install OS packages
|
9
|
+
command: apk add git build-base ruby-dev ruby-etc ruby-json libsodium
|
10
|
+
- checkout
|
11
|
+
- run:
|
12
|
+
name: "Ruby version"
|
13
|
+
command: |
|
14
|
+
ruby -v
|
15
|
+
echo $RUBY_VERSION > ruby_version.txt
|
16
|
+
- restore_cache:
|
17
|
+
keys:
|
18
|
+
- bundle-cache-v1-{{ checksum "ruby_version.txt" }}-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "discordrb.gemspec" }}
|
19
|
+
- bundle-cache-v1-{{ checksum "ruby_version.txt" }}-{{ .Branch }}
|
20
|
+
- bundle-cache-v1-{{ checksum "ruby_version.txt" }}
|
21
|
+
- run:
|
22
|
+
name: Install dependencies
|
23
|
+
command: bundle install --path vendor/bundle
|
24
|
+
- save_cache:
|
25
|
+
key: bundle-cache-v1-{{ checksum "ruby_version.txt" }}-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "discordrb.gemspec" }}
|
26
|
+
paths:
|
27
|
+
- ./vendor/bundle
|
28
|
+
|
29
|
+
jobs:
|
30
|
+
test_ruby_25:
|
31
|
+
docker:
|
32
|
+
- image: ruby:2.5-alpine
|
33
|
+
steps:
|
34
|
+
- setup-env
|
35
|
+
- run:
|
36
|
+
name: Run RSpec
|
37
|
+
command: bundle exec rspec
|
38
|
+
|
39
|
+
test_ruby_26:
|
40
|
+
docker:
|
41
|
+
- image: ruby:2.6-alpine
|
42
|
+
steps:
|
43
|
+
- setup-env
|
44
|
+
- run:
|
45
|
+
name: Run RSpec
|
46
|
+
command: bundle exec rspec
|
47
|
+
|
48
|
+
test_ruby_27:
|
49
|
+
docker:
|
50
|
+
- image: ruby:2.7-alpine
|
51
|
+
steps:
|
52
|
+
- setup-env
|
53
|
+
- run:
|
54
|
+
name: Run RSpec
|
55
|
+
command: bundle exec rspec
|
56
|
+
|
57
|
+
rubocop:
|
58
|
+
docker:
|
59
|
+
- image: ruby:2.5-alpine
|
60
|
+
steps:
|
61
|
+
- setup-env
|
62
|
+
- run:
|
63
|
+
name: Run Rubocop
|
64
|
+
command: bundle exec rubocop -P
|
65
|
+
|
66
|
+
yard:
|
67
|
+
docker:
|
68
|
+
- image: ruby:2.5-alpine
|
69
|
+
steps:
|
70
|
+
- setup-env
|
71
|
+
- attach_workspace:
|
72
|
+
at: /tmp/workspace
|
73
|
+
- run:
|
74
|
+
name: Run YARD
|
75
|
+
command: bundle exec yard --output-dir /tmp/workspace/docs
|
76
|
+
- persist_to_workspace:
|
77
|
+
root: /tmp/workspace
|
78
|
+
paths:
|
79
|
+
- docs
|
80
|
+
|
81
|
+
pages:
|
82
|
+
machine: true
|
83
|
+
steps:
|
84
|
+
- attach_workspace:
|
85
|
+
at: /tmp/workspace
|
86
|
+
- run:
|
87
|
+
name: Clone docs
|
88
|
+
command: git clone $CIRCLE_REPOSITORY_URL -b gh-pages .
|
89
|
+
- add_ssh_keys:
|
90
|
+
fingerprints:
|
91
|
+
- "9a:4c:50:94:23:46:81:74:41:97:87:04:4e:59:4b:4e"
|
92
|
+
- run:
|
93
|
+
name: Push updated docs
|
94
|
+
command: |
|
95
|
+
git config user.name "Circle CI"
|
96
|
+
git config user.email "ci-build@shardlab.dev"
|
97
|
+
|
98
|
+
SOURCE_BRANCH=$CIRCLE_BRANCH
|
99
|
+
if [ -n "$CIRCLE_TAG" ]; then
|
100
|
+
SOURCE_BRANCH=$CIRCLE_TAG
|
101
|
+
fi
|
102
|
+
|
103
|
+
mkdir -p $SOURCE_BRANCH
|
104
|
+
rm -rf $SOURCE_BRANCH/*
|
105
|
+
cp -r /tmp/workspace/docs/. ./$SOURCE_BRANCH/
|
106
|
+
|
107
|
+
git add $SOURCE_BRANCH
|
108
|
+
git commit --allow-empty -m "[skip ci] Deploy docs"
|
109
|
+
git push -u origin gh-pages
|
110
|
+
|
111
|
+
workflows:
|
112
|
+
test:
|
113
|
+
jobs:
|
114
|
+
- test_ruby_25
|
115
|
+
- test_ruby_26
|
116
|
+
- test_ruby_27
|
117
|
+
- rubocop
|
118
|
+
- yard
|
119
|
+
deploy:
|
120
|
+
jobs:
|
121
|
+
- yard:
|
122
|
+
filters: {branches: {only: main}, tags: {only: /^v.*/}}
|
123
|
+
- pages:
|
124
|
+
requires:
|
125
|
+
- yard
|
126
|
+
filters: {branches: {only: main}, tags: {only: /^v.*/}}
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributing guidelines
|
2
|
+
|
3
|
+
Any contributions are very much appreciated! This project is relatively relaxed when it comes to guidelines, however
|
4
|
+
there are still some things that would be nice to have considered.
|
5
|
+
|
6
|
+
For bug reports, please try to include a code sample if at all appropriate for
|
7
|
+
the issue, so we can reproduce it on our own machines.
|
8
|
+
|
9
|
+
For PRs, please make sure that you tested your code before every push; it's a little annoying to keep having to get back
|
10
|
+
to a PR because of small avoidable oversights. (Huge bonus points if you're adding specs for your code! This project
|
11
|
+
has very few specs in places where it should have more so every added spec is very much appreciated.)
|
12
|
+
|
13
|
+
If you have any questions at all, don't be afraid to ask in the [discordrb channel on Discord](https://discord.gg/cyK3Hjm).
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Report a bug to help us improve the library
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
# Summary
|
8
|
+
|
9
|
+
<!---
|
10
|
+
First, please check to see that another issue or pull request (open or closed)
|
11
|
+
already addresses the problem you are facing. If you are not sure, please ask
|
12
|
+
in the Discord channel (link below).
|
13
|
+
|
14
|
+
Describe the bug you are encountering with as much detail as you can.
|
15
|
+
If you are not sure if a small detail is relevant, include it anyways!
|
16
|
+
|
17
|
+
Include simple code examples that will reproduce the bug.
|
18
|
+
Include any exceptions you are encountering in your logs, including
|
19
|
+
the initial error message and the backtrace that follows.
|
20
|
+
|
21
|
+
Stuck or need help? Join the Discord! https://discord.gg/cyK3Hjm
|
22
|
+
-->
|
23
|
+
|
24
|
+
---
|
25
|
+
|
26
|
+
## Environment
|
27
|
+
|
28
|
+
<!---
|
29
|
+
These are some commands to run to give us basic information about
|
30
|
+
your Ruby environment. Some issues may be version, OS, or hardware specific.
|
31
|
+
--->
|
32
|
+
|
33
|
+
**Ruby version:**
|
34
|
+
|
35
|
+
<!--- Paste full output of `ruby -v` here --->
|
36
|
+
|
37
|
+
**Discordrb version:**
|
38
|
+
|
39
|
+
<!--- Paste full output of `gem list discordrb` or `bundle list discordrb` here --->
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
name: Feature Request
|
3
|
+
about: Request a new feature, or change an existing one
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
<!---
|
8
|
+
Describe your feature request in as much detail as you can here.
|
9
|
+
|
10
|
+
Include why you want this feature. For example:
|
11
|
+
|
12
|
+
- It is a feature supported by Discord's API, but missing from the library
|
13
|
+
|
14
|
+
- It is a feature that would simplify a lot of your bots code
|
15
|
+
|
16
|
+
- It is a feature present in other popular Discord libraries
|
17
|
+
|
18
|
+
Include simple code examples (pseudocode is fine) that demonstrate
|
19
|
+
what you want to do.
|
20
|
+
|
21
|
+
Do your best to think about how this new feature would impact the code
|
22
|
+
of other people who use discordrb, and not just your own bot's codebase.
|
23
|
+
|
24
|
+
Stuck or need help? Join the Discord! https://discord.gg/cyK3Hjm
|
25
|
+
--->
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Summary
|
2
|
+
|
3
|
+
<!---
|
4
|
+
Describe the general goal of your pull request here:
|
5
|
+
|
6
|
+
- Include details about any issues you encountered that inspired
|
7
|
+
the pull request, such as bugs or missing features.
|
8
|
+
|
9
|
+
- If adding or changing features, include a small example that showcases
|
10
|
+
the new behavior.
|
11
|
+
|
12
|
+
- Reference any related issues or pull requests.
|
13
|
+
|
14
|
+
Stuck or need help? Join the Discord! https://discord.gg/cyK3Hjm
|
15
|
+
--->
|
16
|
+
|
17
|
+
---
|
18
|
+
|
19
|
+
<!---
|
20
|
+
List each individual change you made to the library here in the appropriate
|
21
|
+
section in short, bulleted sentences.
|
22
|
+
|
23
|
+
This will aid in reviewing your pull request, and for adding it to the
|
24
|
+
changelog later.
|
25
|
+
|
26
|
+
You may remove sections that have no items if you want.
|
27
|
+
--->
|
28
|
+
|
29
|
+
## Added
|
30
|
+
|
31
|
+
## Changed
|
32
|
+
|
33
|
+
## Deprecated
|
34
|
+
|
35
|
+
## Removed
|
36
|
+
|
37
|
+
## Fixed
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,56 +1,62 @@
|
|
1
|
-
|
2
|
-
Metrics/AbcSize:
|
3
|
-
Enabled: false
|
1
|
+
require: rubocop-performance
|
4
2
|
|
5
|
-
|
6
|
-
|
3
|
+
inherit_mode:
|
4
|
+
merge:
|
5
|
+
- AllowedNames
|
7
6
|
|
8
|
-
|
9
|
-
|
7
|
+
AllCops:
|
8
|
+
NewCops: enable
|
9
|
+
TargetRubyVersion: 2.5
|
10
10
|
|
11
|
-
|
11
|
+
# Disable line length checks
|
12
|
+
Layout/LineLength:
|
12
13
|
Enabled: false
|
13
14
|
|
14
|
-
|
15
|
+
# TODO: Larger refactor
|
16
|
+
Lint/MissingSuper:
|
15
17
|
Enabled: false
|
16
18
|
|
17
|
-
|
19
|
+
# Allow 'Pokémon-style' exception handling
|
20
|
+
Lint/RescueException:
|
18
21
|
Enabled: false
|
19
22
|
|
20
|
-
|
23
|
+
# Disable all metrics.
|
24
|
+
Metrics:
|
21
25
|
Enabled: false
|
22
26
|
|
23
|
-
|
24
|
-
|
27
|
+
# Allow some common and/or obvious short method params
|
28
|
+
Naming/MethodParameterName:
|
29
|
+
AllowedNames:
|
30
|
+
- e
|
25
31
|
|
26
|
-
|
32
|
+
# Ignore `eval` in the examples folder
|
33
|
+
Security/Eval:
|
34
|
+
Exclude:
|
35
|
+
- examples/**/*
|
36
|
+
|
37
|
+
# https://stackoverflow.com/q/4763121/
|
38
|
+
Style/Alias:
|
27
39
|
Enabled: false
|
28
40
|
|
29
41
|
# Prefer compact module/class defs
|
30
42
|
Style/ClassAndModuleChildren:
|
31
43
|
Enabled: false
|
32
44
|
|
33
|
-
#
|
34
|
-
Style/
|
35
|
-
|
45
|
+
# So RuboCop doesn't complain about application IDs
|
46
|
+
Style/NumericLiterals:
|
47
|
+
Exclude:
|
48
|
+
- examples/**/*
|
36
49
|
|
37
|
-
#
|
38
|
-
|
50
|
+
# TODO: Requires breaking changes
|
51
|
+
Style/OptionalBooleanParameter:
|
39
52
|
Enabled: false
|
40
53
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
# http://stackoverflow.com/questions/4763121/should-i-use-alias-or-alias-method
|
45
|
-
Style/Alias:
|
54
|
+
# Prefer explicit arguments in case global variables like `$;` or `$,` are changed
|
55
|
+
Style/RedundantArgument:
|
46
56
|
Enabled: false
|
47
57
|
|
48
|
-
#
|
49
|
-
Style/
|
50
|
-
|
51
|
-
-
|
52
|
-
|
53
|
-
# Ignore `eval` in the examples folder
|
54
|
-
Lint/Eval:
|
55
|
-
Exclude:
|
56
|
-
- examples/*
|
58
|
+
# Prefer |m, e| for the `reduce` block arguments
|
59
|
+
Style/SingleLineBlockParams:
|
60
|
+
Methods:
|
61
|
+
- reduce: [m, e]
|
62
|
+
- inject: [m, e]
|
data/.travis.yml
CHANGED
@@ -1,7 +1,32 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
|
3
|
+
- 2.5
|
4
|
+
- 2.6
|
5
|
+
before_script:
|
6
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter
|
7
|
+
- chmod +x ./cc-test-reporter
|
8
|
+
- ./cc-test-reporter before-build
|
9
|
+
- sudo apt-get install libsodium-dev
|
5
10
|
script:
|
6
11
|
- bundle exec rspec spec
|
7
12
|
- bundle exec rubocop -c .rubocop.yml
|
13
|
+
- bin/travis_build_docs.sh
|
14
|
+
after_script:
|
15
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
16
|
+
deploy:
|
17
|
+
- provider: pages
|
18
|
+
skip-cleanup: true
|
19
|
+
github-token: $GITHUB_TOKEN
|
20
|
+
keep-history: true
|
21
|
+
local-dir: docs
|
22
|
+
on:
|
23
|
+
branch: master
|
24
|
+
rvm: 2.6
|
25
|
+
- provider: pages
|
26
|
+
skip-cleanup: true
|
27
|
+
github-token: $GITHUB_TOKEN
|
28
|
+
keep-history: true
|
29
|
+
local-dir: docs
|
30
|
+
on:
|
31
|
+
tags: true
|
32
|
+
rvm: 2.6
|
data/.yardopts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--markup markdown --hide-tag todo
|
1
|
+
--markup markdown --hide-tag todo --fail-on-warning
|
data/CHANGELOG.md
CHANGED
@@ -1,233 +1,673 @@
|
|
1
1
|
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
2
3
|
|
3
|
-
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
6
|
|
5
|
-
|
7
|
+
## [3.4.0] - 2020-12-06
|
8
|
+
[3.4.0]: https://github.com/shardlab/discordrb/releases/tag/v3.3.0
|
6
9
|
|
7
|
-
|
10
|
+
[View diff for this release.](https://github.com/shardlab/discordrb/compare/v3.4.0...v3.3.0)
|
8
11
|
|
9
|
-
|
12
|
+
### Summary
|
10
13
|
|
11
|
-
|
14
|
+
This release has been a _very_ long time coming. It brings countless fixes, performance increases, features, and changes. So many in fact, that it's only feasible to put the major hilights in summary.
|
15
|
+
|
16
|
+
The largest additions are that of intents support and a massive performance increase in our websocket read loop.
|
17
|
+
|
18
|
+
Intents allow you to pick and choose what types of events are fed to your bot over the gateway. An example usage would be:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
Discordrb::Bot.new(token: 'B0T.T0K3N', intents: %i[servers server_messages])
|
22
|
+
```
|
12
23
|
|
13
|
-
- Emoji handling support ([#226](https://github.com/meew0/discordrb/pull/226), thanks @greenbigfrog)
|
14
|
-
- 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/meew0/discordrb/pull/249), thanks @Xzanth)
|
15
|
-
- The bulk deletion endpoint is now exposed directly using the `Channel#delete_messages` method ([#235](https://github.com/meew0/discordrb/pull/235), thanks @z64)
|
16
|
-
- The internal settings fields for user statuses that cause statuses to persist across restarts can now be modified ([#233](https://github.com/meew0/discordrb/pull/233), thanks @Daniel-Worrall)
|
17
|
-
- A few examples have been added to the docs ([#250](https://github.com/meew0/discordrb/pull/250), thanks @SunDwarf)
|
18
|
-
- The specs have been improved; they're still not exhaustive by far but there are at least slightly more now.
|
19
24
|
|
20
|
-
|
25
|
+
In this example, we would only recieve the following events
|
26
|
+
- GUILD_CREATE
|
27
|
+
- GUILD_UPDATE
|
28
|
+
- GUILD_DELETE
|
29
|
+
- GUILD_ROLE_CREATE
|
30
|
+
- GUILD_ROLE_UPDATE
|
31
|
+
- GUILD_ROLE_DELETE
|
32
|
+
- CHANNEL_CREATE
|
33
|
+
- CHANNEL_UPDATE
|
34
|
+
- CHANNEL_DELETE
|
35
|
+
- CHANNEL_PINS_UPDATE
|
36
|
+
- MESSAGE_CREATE
|
37
|
+
- MESSAGE_UPDATE
|
38
|
+
- MESSAGE_DELETE
|
39
|
+
- MESSAGE_DELETE_BULK
|
40
|
+
|
41
|
+
This feature is still experimental, as it is still unclear how some interactions within the library behave when denied previously expected events. This support will improve over time. If you want more information on intents you can read [the official documentation](https://discord.com/developers/docs/topics/gateway#gateway-intents) as well as the documentation for `Discordrb::INTENTS` and `Discordrb::Bot#initialize`.
|
42
|
+
|
43
|
+
### Added
|
44
|
+
|
45
|
+
- `Bot#parse_mentions`, which extracts *all* mentions found in a string ([#526](https://github.com/discordrb/discordrb/pull/526), thanks @SanksTheYokai)
|
46
|
+
- Issue and pull request templates ([#585](https://github.com/discordrb/discordrb/pull/585))
|
47
|
+
- `Server#bot` method for obtaining your bot's own `Member` on a particular server ([#597](https://github.com/discordrb/discordrb/pull/597))
|
48
|
+
- `Attachment#spoiler?`, to check if an attachment is a spoiler or not ([#603](https://github.com/discordrb/discordrb/pull/603), thanks @swarley)
|
49
|
+
- Methods on `Server` to manage the server's emoji ([#595](https://github.com/discordrb/discordrb/pull/595), thanks @swarley)
|
50
|
+
- `Paginator` utility class for wrapping paginated endpoints ([#579](https://github.com/discordrb/discordrb/pull/579))
|
51
|
+
- `EventContainer#message_update`, which is fired whenever a message is updated, either by Discord or the user ([#612](https://github.com/discordrb/discordrb/pull/612), thanks @swarley)
|
52
|
+
- `Message#server` ([#614](https://github.com/discordrb/discordrb/pull/614), thanks @swarley)
|
53
|
+
- `Channel#news?`, `Channel#store?` ([#618](https://github.com/discordrb/discordrb/pull/618), thanks @swarley)
|
54
|
+
- `Server#bot_members`, `Server#non_bot_members` ([#626](https://github.com/discordrb/discordrb/pull/626), thanks @flutterflies)
|
55
|
+
- `API.get_gateway_bot` ([#632](https://github.com/discordrb/discordrb/pull/632))
|
56
|
+
- `Channel#create_webhook` ([#637](https://github.com/discordrb/discordrb/pull/637), thanks @Chew)
|
57
|
+
- `User#dnd?` and documentation for other user status methods ([#679](https://github.com/discordrb/discordrb/pull/679), thanks @kaine119)
|
58
|
+
- `Message#link`, `Channel#link`, `Server#link` ([commit](https://github.com/shardlab/discordrb/commit/44f93948a812e06b439968c6b072c0d9b749a842), thanks @z64)
|
59
|
+
- `ReactionEvent#message_id` and `message` option for `ReactionEventHandler` ([#728](https://github.com/discordrb/discordrb/pull/728), thanks @swarley)
|
60
|
+
- `intents` option for `Bot#initialize`, `INTENTS`, and `ALL_INTENTS` for experimental intents support ([#698](https://github.com/discordrb/discordrb/pull/698), thanks @swarley)
|
61
|
+
- `reason` positional arguments for various API methods, support for new audit log events ([#682](https://github.com/discordrb/discordrb/pull/682), thanks @swarley)
|
62
|
+
- Support for `attachment://` procotol linking in `API::Channel.create_message` and methods that utilize it (`Bot#send_message`, `Channel#send_message`, `Channel#send_temporary_message`, `Channel#send_embed`, `Respondable#send_message`, `Respondable#send_embed`) ([#735](https://github.com/discordrb/discordrb/pull/735), thanks @swarley)
|
63
|
+
- `AllowedMentions`, and `allowed_mentions` positional arguments to `API::Channel.create_message`, `Bot#send_message`, `Bot#send_temporary_message`, `Channel#send_message`, `Channel#send_temporary_message`, `Channel#send_embed`, `Respondable#send_message`, `Respondable#send_embed`, and `Respondable#send_temporary_message` ([#708](https://github.com/discordrb/discordrb/pull/708), thanks @swarley)
|
64
|
+
- `with_counts` optional positional argument to `API::Server.resolve` ([#709](https://github.com/discordrb/discordrb/pull/709), thanks @swarley)
|
65
|
+
- Expose full options to `Bot#send_temporary_message` and `Respondable#send_temporary_message` ([commit](https://github.com/shardlab/discordrb/commit/d20203211603cd4c06212d99e733bf5f5b3c8f0b), thanks @Birdie0)
|
66
|
+
- `User#client_status`, `PresenceEvent#client_status`, and `client_status` option for `EventContainer#presence` ([#736](https://github.com/discordrb/discordrb/pull/736), thanks @swarley)
|
67
|
+
- `VoiceServerUpdateEvent`, and `EventContainer#voice_server_update` ([#743](https://github.com/discordrb/discordrb/pull/743), thanks @swarley)
|
68
|
+
- Invite events, `InviteCreateEvent`, `InviteDeleteEvent`, `EventContainer#invite_create`, `EventContainer#invite_delete` and `Server#splash_hash` ([#744](https://github.com/discordrb/discordrb/pull/744), thanks @swarley)
|
69
|
+
- `Message#reply!`, `Message#reply?`, `Message#referenced_message` for inline reply support ([#3](https://github.com/shardlab/discordrb/pull/3), thanks @swarley)
|
70
|
+
|
71
|
+
### Changed
|
72
|
+
|
73
|
+
- Drop support for Ruby 2.3 (EOL) ([#583](https://github.com/discordrb/discordrb/pull/583), thanks @PanisSupraOmnia)
|
74
|
+
- **(breaking change)** Upgraded minimum Ruby version to 2.3.7, and upgraded Rubocop to 0.60.0. This additionally changes the name of some public constants. ([#487](https://github.com/discordrb/discordrb/pull/487), thanks @PanisSupraOmnia)
|
75
|
+
- Dependencies for `rbnacl`, `rake`, and `rspec` have been updated ([#538](https://github.com/discordrb/discordrb/pull/538), thanks @PanisSupraOmnia)
|
76
|
+
- The monolithic `data.rb` file has been split into multiple files for easier development ([#482](https://github.com/discordrb/discordrb/pull/482))
|
77
|
+
- Loosened `bundler` development dependency to allow use of `bundler` 1.x and 2.x ([#591](https://github.com/discordrb/discordrb/pull/591), thanks @PanisSupraOmnia)
|
78
|
+
- `API::Server.create_channel` and `Server#create_channel` now accepts `position` ([#592](https://github.com/discordrb/discordrb/pull/592), thanks @swarley)
|
79
|
+
- `Bot.new` will now raise a more helpful exception when the passed token string is empty or nil ([#599](https://github.com/discordrb/discordrb/pull/599))
|
80
|
+
- `compress_mode` in `Bot.new` now defaults to `:large` instead of `:stream` ([#601](https://github.com/discordrb/discordrb/pull/601))
|
81
|
+
- `send_file` methods now accept `filename` to rename a file when uploading to Discord ([#605](https://github.com/discordrb/discordrb/pull/605), thanks @swarley)
|
82
|
+
- Emoji related `API` methods now accept arguments to change an emoji's role whitelist ([#595](https://github.com/discordrb/discordrb/pull/595), thanks @swarley)
|
83
|
+
- `send_file` API now accepts a `spoiler` kwarg to send the file as a spoiler ([#606](https://github.com/discordrb/discordrb/pull/606), thanks @swarley)
|
84
|
+
- Clarified use of `API.bot_name=` ([#622](https://github.com/discordrb/discordrb/pull/622), thanks @Daniel-Worrall)
|
85
|
+
- `Message#reacted_with` can now return all users who reacted with an emoji, instead of just the first 25 ([#615](https://github.com/discordrb/discordrb/pull/615), thanks @swarley)
|
86
|
+
- `Server#create_channel` can create store and news channels, if you have access to do so ([#618](https://github.com/discordrb/discordrb/pull/618), thanks @swarley)
|
87
|
+
- Typestrings for API that accepts discord IDs is now consistently represented as `String, Integer` ([#616](https://github.com/discordrb/discordrb/pull/616), thanks @swarley)
|
88
|
+
- When a command is executed with an invalid number of arguments, the error response is sent as a single message ([#627](https://github.com/discordrb/discordrb/pull/627))
|
89
|
+
- The `#split_send` utility method returns `nil`, to avoid the case where the return value is captured in the implicit return message ([#629](https://github.com/discordrb/discordrb/pull/629), thanks @captainSV)
|
90
|
+
- Give up reconnecting after receiving a fatal close code ([#633](https://github.com/discordrb/discordrb/pull/633))
|
91
|
+
- Misc upgrades to RuboCop v0.68 ([#624](https://github.com/discordrb/discordrb/pull/624), thanks @PanisSupraOmnia)
|
92
|
+
- `await!` methods now accept a block to test for matching event conditions ([#635](https://github.com/discordrb/discordrb/pull/635), thanks @z64)
|
93
|
+
- Dependency updates for RuboCop v0.74, redcarpet, and simplecov ([#636](https://github.com/discordrb/discordrb/pull/636), thanks @PanisSupraOmnia)
|
94
|
+
- Update voice logic to connect to the IP address from READY ([#644](https://github.com/discordrb/discordrb/pull/644), thanks @swarley)
|
95
|
+
- Refactored use of enumerable code in `Discordrb.split_message` ([#646](https://github.com/discordrb/discordrb/pull/646), thanks @piharpi)
|
96
|
+
- **(deprecated)** `no_sync` argument in `Bot#stop` is now considered deprecated as part of a refactor that removes Ruby 2.3 compatibility ([#652](https://github.com/discordrb/discordrb/pull/652), thanks @PanisSupraOmnia)
|
97
|
+
- Return `rest-client` dependency to `>= 2.0.0` since `2.1.0` is now released ([#654](https://github.com/discordrb/discordrb/pull/654), thanks @ali-l)
|
98
|
+
- Added Bit for "Streaming" permission ([#660](https://github.com/discordrb/discordrb/pull/660), thanks @NCPlayz)
|
99
|
+
- Methods for Nitro boosting related information ([#638](https://github.com/discordrb/discordrb/pull/638), thanks @Chew)
|
100
|
+
- `ServerDeleteEvent#server` now returns an `Integer` ([commit](https://github.com/discordrb/discordrb/commit/bb457fe981d2b997b704ad85008ec3b185b046e8), thanks @z64)
|
101
|
+
- User activites are now represented by `ActivitySet`, from `User#activities` ([#677](https://github.com/discordrb/discordrb/pull/677), thanks @swarley)
|
102
|
+
- **(deprecated)** `User#game`, `User#stream_type`, and `User#stream_url` are considered deprecated in favor of `ActivitySet#games` and `ActivitySet#streaming` as activities are no longer considered to be singular. ([#677](https://github.com/discordrb/discordrb/pull/677), thanks @swarley)
|
103
|
+
- Non CDN links now use the updated domain name `https://discord.com` ([#720](https://github.com/discordrb/discordrb/pull/720), thanks @swarley)
|
104
|
+
- Additional fields are included in `Role#inspect` ([#731](https://github.com/discordrb/discordrb/pull/731), thanks @IotaSpencer)
|
105
|
+
- `Invite#server` and `Invite#channel` can both return partial or full objects depending on the data source ([#744](https://github.com/discordrb/discordrb/pull/744), thanks @swarley)
|
106
|
+
- Members now have the `@everyone` role ([#739](https://github.com/discordrb/discordrb/pull/739), thanks @kdance21)
|
107
|
+
- Add `message_reference` as an optional positional argument to the following methods. `API::Channel.create_message`, `Bot#send_message`, `Channel#send_message`, `Channel#send_temporary_message`, `Channel#send_embed`, `Events::MessageEvent#send_message`, and `Events::MessageEvent#send_embed` ([#3](https://github.com/shardlab/discordrb/pull/3), thanks @swarley)
|
108
|
+
- **(deprecated)** `Message#reply` has been deprecated in favor of `Message#respond`, and the functionality will be replaced with that of `reply!` in 4.0 ([#3](https://github.com/shardlab/discordrb/pull/3), thanks @swarley)
|
109
|
+
|
110
|
+
### Fixed
|
111
|
+
|
112
|
+
- Permission calculation when the internal sorting of roles is unreliable ([#609](https://github.com/discordrb/discordrb/pull/609))
|
113
|
+
- `DisconnectEvent` is now raised when a gateway close frame is handled ([#611](https://github.com/discordrb/discordrb/pull/611), thanks @swarley)
|
114
|
+
- A cached `Channel` is no longer assumed to be NSFW if its name starts with `nsfw` ([#617](https://github.com/discordrb/discordrb/pull/617), thanks @swarley)
|
115
|
+
- **(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
|
+
- `Channel#nsfw=` correctly forwards updated value to the API ([#628](https://github.com/discordrb/discordrb/pull/628))
|
117
|
+
- `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)
|
119
|
+
- `Emoji#to_reaction` works correctly for unicode emoji ([#642](https://github.com/discordrb/discordrb/pull/642), thanks @z64)
|
120
|
+
- `Server#add_member_using_token` returns `nil` when user is already a member ([#643](https://github.com/discordrb/discordrb/pull/643), thanks @swarley)
|
121
|
+
- `CommandBot`'s `Integer` parser interprets all integers as base 10 ([#656](https://github.com/discordrb/discordrb/pull/656), thanks @joshleblanc)
|
122
|
+
- Broken reference link in `CommandBot#initialize` documentation ([#647](https://github.com/discordrb/discordrb/pull/647), thanks @Daniel-Worrall)
|
123
|
+
- Return the correct value for `Message#reactions?` ([#729](https://github.com/discordrb/discordrb/pull/729), thanks @swarley)
|
124
|
+
- Gateway closes with a 4000 code on `RECONNECT`, preserving the session ([#727](https://github.com/discordrb/discordrb/pull/727), thanks @swarley)
|
125
|
+
- `Emoji#mention` works correctly for unicode emojis ([#715](https://github.com/discordrb/discordrb/pull/715), thanks @swarley)
|
126
|
+
- Voice now uses gateway v4 ([#648](https://github.com/discordrb/discordrb/pull/648), thanks @swarley)
|
127
|
+
- VoiceBot now sends a `KILL` signal instead of `TERM` on Windows hosts when ending the ffmpeg process. ([#732](https://github.com/discordrb/discordrb/pull/732), thanks @swarley)
|
128
|
+
- `Message#emoji` returns more reliably when used with other mention types ([#724](https://github.com/discordrb/discordrb/pull/724), thanks @omnilord)
|
129
|
+
- Permission calculation now properly considers overwrites ([#712](https://github.com/discordrb/discordrb/pull/712), thanks @swarley)
|
130
|
+
|
131
|
+
### Removed
|
132
|
+
|
133
|
+
- Removed dependency on `rbnacl` in favor of our own FFI bindings ([#641](https://github.com/discordrb/discordrb/pull/641), thanks @z64)
|
134
|
+
|
135
|
+
## [3.3.0] - 2018-10-27
|
136
|
+
[3.3.0]: https://github.com/discordrb/discordrb/releases/tag/v3.3.0
|
137
|
+
|
138
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.1...v3.3.0)
|
139
|
+
|
140
|
+
|
141
|
+
### Summary
|
142
|
+
|
143
|
+
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.
|
144
|
+
|
145
|
+
Since there is a lot here, here are highlights of the more notable changes in this release:
|
146
|
+
|
147
|
+
- We now use SSL certificate validation in our gateway connections, and enforce use of TLSv1.2. If this is an issue
|
148
|
+
for your platform or environment (you get errors related to SSL), please report this with relevant details. You
|
149
|
+
can revert to the old codepath at any time by setting `DISCORDRB_SSL_VERIFY_NONE`. This environment variable will
|
150
|
+
be removed in a later release when this proves to be a stable default.
|
151
|
+
|
152
|
+
- `CommandBot` now supports a new method of "aliasing" commands with the `aliases:` keyword. It accepts an array
|
153
|
+
of symbols of alternate command names. Currently this is supported by passing an array of symbols for the command
|
154
|
+
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 *are aliases* instead of copying the command.
|
156
|
+
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
|
+
either style, but you cannot use both. Specifying an array for the command name is now considered deprecated.
|
158
|
+
|
159
|
+
- There are now two methods of creating "awaits" in discordrb. The new style is a blocking (synchronous) method that
|
160
|
+
uses threads and regular event handlers in the background. The new methods are all named with a bang (`!`),
|
161
|
+
i.e. `user.await!`, `message.await!`, and simply return the raised event. This system should be less confusing than
|
162
|
+
the current asynchronous one. These blocking awaits no longer have an identifying key and only accept the event
|
163
|
+
attributes as an argument. There is also a special reserved attribute called `timeout` that will stop waiting for
|
164
|
+
an event and return `nil` if the given number of seconds has passed. Eventually this new system of awaits will
|
165
|
+
replace the old one in a later breaking change. A short example:
|
166
|
+
|
167
|
+
```ruby
|
168
|
+
bot.message(content: '!test') do |event|
|
169
|
+
event.respond 'What is your name?'
|
170
|
+
response = event.message.await!(timeout: 3)
|
171
|
+
if response
|
172
|
+
event.respond "Hello, #{response.message.content}!"
|
173
|
+
else
|
174
|
+
event.respond 'You took too long!'
|
175
|
+
end
|
176
|
+
end
|
177
|
+
```
|
21
178
|
|
22
|
-
|
179
|
+
The entire changelog follows, with items that contain breaking changes noted. If you use parts of the library
|
180
|
+
mentioned in a breaking change, you can read the PR and diff for the full details. If you need help with
|
181
|
+
understanding, updating your bot, or have any other questions, please feel free to [join us on Discord](https://discord.gg/cyK3Hjm)
|
182
|
+
or open an issue if necessary.
|
183
|
+
|
184
|
+
Thank you to all of our contributors!
|
185
|
+
|
186
|
+
### Added
|
187
|
+
|
188
|
+
- API methods to add and remove single member roles ([#310](https://github.com/discordrb/discordrb/pull/310))
|
189
|
+
- **(breaking change)** API methods and abstractions for listing available voice regions ([#311](https://github.com/discordrb/discordrb/pull/311))
|
190
|
+
- `Server` methods to prune members and to get the number of members available for pruning ([#315](https://github.com/discordrb/discordrb/pull/315))
|
191
|
+
- Methods for filtering the kinds of overwrites present on a channel ([#321](https://github.com/discordrb/discordrb/pull/321))
|
192
|
+
- `Channel#default_channel?`, for checking if a channel is the default channel of a server ([#320](https://github.com/discordrb/discordrb/pull/320), thanks @Reaver01)
|
193
|
+
- Method for returning a `Server`'s `@everyone` role
|
194
|
+
- Reactions can now be serialized with `#to_s` to be used in `Message#react` more easily ([#342](https://github.com/discordrb/discordrb/pull/342))
|
195
|
+
- Additional objects and attributes for parsing embeds on messages ([#344](https://github.com/discordrb/discordrb/pull/344), thanks @mattantonelli)
|
196
|
+
- Methods for finding a members highest role, the role that is hoisting the member, or giving the member color ([#335](https://github.com/discordrb/discordrb/pull/335), thanks @Snazzah)
|
197
|
+
- API support for managing webhooks ([#356](https://github.com/discordrb/discordrb/pull/356), thanks @Daniel-Worrall)
|
198
|
+
- Support for reading and managing a channel's `nsfw` property ([#380](https://github.com/discordrb/discordrb/pull/380))
|
199
|
+
- The `:administrator` permissions value is aliased as `:administrate` ([#322](https://github.com/discordrb/discordrb/pull/322))
|
200
|
+
- Class methods on `Permissions` for easily building permissions bits values ([#322](https://github.com/discordrb/discordrb/pull/322))
|
201
|
+
- `Gateway#send_packet` and `Gateway#send_raw` methods to send custom data payloads to the gateway
|
202
|
+
- Methods for reading `icon_url` and `proxy_icon_url` in `EmbedAuthor`
|
203
|
+
- Methods for obtaining a server and channels invites ([#394](https://github.com/discordrb/discordrb/pull/394))
|
204
|
+
- Example of using awaits ([#370](https://github.com/discordrb/discordrb/pull/370))
|
205
|
+
- Methods on `Member` for kicking and banning ([#404](https://github.com/discordrb/discordrb/pull/404))
|
206
|
+
- API method and abstraction for adding members to guilds with OAuth2 tokens ([#413](https://github.com/discordrb/discordrb/pull/413))
|
207
|
+
- Example of using a prefix proc ([#411](https://github.com/discordrb/discordrb/pull/411))
|
208
|
+
- **(breaking change)** Methods for managing a server's system channel ([#437](https://github.com/discordrb/discordrb/pull/437), thanks @ldelelis)
|
209
|
+
- **(breaking change)** Additional error code constants ([#419](https://github.com/discordrb/discordrb/pull/419), thanks @LikeLakers2)
|
210
|
+
- Commands can be created with a `:rescue` argument, to provide a message or callback when an unhandled exception is raised when executing the command ([#360](https://github.com/discordrb/discordrb/pull/360))
|
211
|
+
- **(breaking change)** Additional `Server` properties for verification levels, default message notification levels, and explicit content filter settings ([#414](https://github.com/discordrb/discordrb/pull/414), thanks @PixeLInc)
|
212
|
+
- **(breaking change)** `nonce` is accepted in `API::Channel.create_message` ([#414](https://github.com/discordrb/discordrb/pull/414), thanks @PixeLInc)
|
213
|
+
- Setters for new status options (`Bot#listening=`, `Bot#watching=`) ([#432](https://github.com/discordrb/discordrb/pull/432), thanks @PixeLInc)
|
214
|
+
- Documentation examples for sending a file ([#409](https://github.com/discordrb/discordrb/pull/409))
|
215
|
+
- Respondable implements `#send_embed` ([#420](https://github.com/discordrb/discordrb/pull/420))
|
216
|
+
- `Invite` now supplies `max_age` and `created_at`
|
217
|
+
- `Invite` now supplies `member_count` and `online_member_count` ([#454](https://github.com/discordrb/discordrb/pull/454), thanks @Snazzah)
|
218
|
+
- `Server` methods for managing a server's embed (widget) settings ([#435](https://github.com/discordrb/discordrb/pull/435))
|
219
|
+
- **(breaking change)** Support for category channels in `Server` and `Channel` ([#415](https://github.com/discordrb/discordrb/pull/415), [#477](https://github.com/discordrb/discordrb/pull/477), thanks @omnilord)
|
220
|
+
- `CommandBot` and commands channel whitelist can now be modified after creation ([#446](https://github.com/discordrb/discordrb/pull/446), thanks @omnilord)
|
221
|
+
- A `Role`'s `position` can now be sorted relative to other roles ([#445](https://github.com/discordrb/discordrb/pull/445), thanks @mattantonelli)
|
222
|
+
- The `return` keyword inside of commands can be used to return content to Discord ([#462](https://github.com/discordrb/discordrb/pull/462), thanks @TrenchFroast)
|
223
|
+
- `Emoji` now supplies `animated` ([#464](https://github.com/discordrb/discordrb/pull/464), thanks @PixeLInc)
|
224
|
+
- Additional instructions for installation of Ruby's devkit for Ruby 2.3+ ([#468](https://github.com/discordrb/discordrb/pull/468), thanks @oct2pus)
|
225
|
+
- `Server` API for retrieving a server's audit logs ([#353](https://github.com/discordrb/discordrb/pull/353), thanks @Snazzah)
|
226
|
+
- `EventContainer` methods for server role create, delete, and update events ([#494](https://github.com/discordrb/discordrb/pull/494), thanks @Daniel-Worrall)
|
227
|
+
- `PlayingEvent` now returns `details` ([#486](https://github.com/discordrb/discordrb/pull/486), thanks @xTVaser)
|
228
|
+
- `Role` now supplies `server` ([#505](https://github.com/discordrb/discordrb/pull/505), thanks @micke)
|
229
|
+
- Documentation for the `discordrb-webhooks` gem in `README.md` ([#460](https://github.com/discordrb/discordrb/pull/460))
|
230
|
+
- A new, synchronous awaits system available via `#await!` ([#499](https://github.com/discordrb/discordrb/pull/499))
|
231
|
+
- `Channel#sort_after`, for moving a channel around a server within categories easily ([#497](https://github.com/discordrb/discordrb/pull/497))
|
232
|
+
- The gemspec now includes a link to the changelog ([#515](https://github.com/discordrb/discordrb/pull/515), thanks @PanisSupraOmnia)
|
233
|
+
- Commands can now be restricted by either `allowed_roles` or `required_roles` ([#469](https://github.com/discordrb/discordrb/pull/469), thanks @elfenars)
|
234
|
+
- `Bot#parse_mention` parses `Channel` mentions ([#525](https://github.com/discordrb/discordrb/pull/525), thanks @estherbolik)
|
235
|
+
- Support for Discord's `zlib-stream` gateway compression, as well as options to configure the compression mode in `Bot#initialize` ([#527](https://github.com/discordrb/discordrb/pull/527), thanks @oct2pus for additional testing)
|
236
|
+
- "Priority Speaker" permission bit ([#530](https://github.com/discordrb/discordrb/pull/530), thanks @Chewsterchew)
|
237
|
+
- Implemented `aliases` attribute in commands, for an improved alternative to "command copying" by passing an array to the command name ([#524](https://github.com/discordrb/discordrb/pull/524))
|
238
|
+
- **(breaking change)** Methods for managing a `Channel`'s slowmode settings ([#573](https://github.com/discordrb/discordrb/pull/573), thanks @badBlackShark)
|
239
|
+
|
240
|
+
### Changed
|
241
|
+
|
242
|
+
- `Channel#make_invite` now accepts an argument to always return a unique invite code ([#312](https://github.com/discordrb/discordrb/pull/312))
|
243
|
+
- More of the API accepts objects that respond to `#resolve_id` ([#313](https://github.com/discordrb/discordrb/pull/313), [#328](https://github.com/discordrb/discordrb/pull/328), thanks @Likelakers2)
|
244
|
+
- **(breaking change)** `Channel#history` and `API::Channel.messages` now accepts `around_id` ([#314](https://github.com/discordrb/discordrb/pull/314))
|
245
|
+
- **(breaking change)** `API::Server.prune_count` accepts `days` ([#315](https://github.com/discordrb/discordrb/pull/315))
|
246
|
+
- **(breaking change)** Methods for creating channels accept additional arguments ([#321](https://github.com/discordrb/discordrb/pull/321))
|
247
|
+
- `Channel` overwrite-related API now returns an `Overwrite` object ([#321](https://github.com/discordrb/discordrb/pull/321))
|
248
|
+
- **(breaking change)** Creating roles now accepts more parameters ([#323](https://github.com/discordrb/discordrb/pull/323), thanks @Reaver01)
|
249
|
+
- Rate limits are now logged to a `:ratelimit` logging level and can be configured
|
250
|
+
- `client_id` in `Bot#initilalize` is now optional, and will be cached automatically by the API when needed ([#337](https://github.com/discordrb/discordrb/pull/337))
|
251
|
+
- `Voice::Encoder#encode_file` now accepts options for ffmpeg ([#341](https://github.com/discordrb/discordrb/pull/341), thanks @oyisre)
|
252
|
+
- Objects that implement `IDObject` can now be compared using more operators ([#346](https://github.com/discordrb/discordrb/pull/346), thanks @mattantonelli)
|
253
|
+
- 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))
|
255
|
+
- Reaction events raised from the bot's actions will respect `parse_self` ([#350](https://github.com/discordrb/discordrb/pull/350), thanks @Daniel-Worrall)
|
256
|
+
- `Webhooks::Embed#initialize` parses its `color`/`colour` argument ([#364](https://github.com/discordrb/discordrb/pull/364), thanks @Daniel-Worrall)
|
257
|
+
- Webhook related events can now be matched on webhook ID ([#363](https://github.com/discordrb/discordrb/pull/363), thanks @Daniel-Worrall)
|
258
|
+
- Discord's default user avatar URLs will now be returned when applicable ([#375](https://github.com/discordrb/discordrb/pull/375))
|
259
|
+
- `Cache#find_user` can now find individual users if name and discriminator is given ([#384](https://github.com/discordrb/discordrb/pull/384))
|
260
|
+
- `ReactionEvent` provides both `server` and `member`, if possible ([#351](https://github.com/discordrb/discordrb/pull/351), thanks @Daniel-Worrall)
|
261
|
+
- Installation instructions now include guides for installing with Bundler ([#386](https://github.com/discordrb/discordrb/pull/386), [#405](https://github.com/discordrb/discordrb/pull/405), thanks @VxJasonxV and @PixeLInc)
|
262
|
+
- **(breaking change)** `default_channel` implementation is updated to reflect Discord changes ([#382](https://github.com/discordrb/discordrb/pull/382), [#534](https://github.com/discordrb/discordrb/pull/534))
|
263
|
+
- Documentation around the conditions where our API returns `nil` is clarified ([#395](https://github.com/discordrb/discordrb/pull/395), thanks @LikeLakers2)
|
264
|
+
- Whenever possible, we update cached data about a `Server` returned to us from making changes to it
|
265
|
+
- **(breaking change)** `Cache#server` now returns `nil` if a server is not found instead of raising an exception ([#424](https://github.com/discordrb/discordrb/pull/424), thanks @soukouki)
|
266
|
+
- `Bucket#rate_limited?` now accepts an `increment` value for weighted rate limits ([#427](https://github.com/discordrb/discordrb/pull/427), thanks @Lavode)
|
267
|
+
- **(breaking change)** `Server#bans` now returns `Array<ServerBan>`, which contains `reason` data in addition to the user banned ([#404](https://github.com/discordrb/discordrb/pull/404))
|
268
|
+
- `Channel#prune` now accepts a block that can be used to filter the messages to be pruned ([#421](https://github.com/discordrb/discordrb/pull/421), thanks @snapcase)
|
269
|
+
- WSCS verions message is now only printed when using voice functionality ([#438](https://github.com/discordrb/discordrb/pull/438), thanks @dreid)
|
270
|
+
- **(breaking change)** `API::Server.update_channel` is now `API::Server.update_channel_positions`
|
271
|
+
- CI is now tested against Ruby 2.3, 2.4, and 2.5 ([#476](https://github.com/discordrb/discordrb/pull/476), thanks @nicolasleger)
|
272
|
+
- CI now tests with YARD to validate docstrings
|
273
|
+
- Specs for `Channel` are refactored ([#481](https://github.com/discordrb/discordrb/pull/481), thanks @Daniel-Worrall)
|
274
|
+
- Specs are refactored to not use `module` namespaces ([#520](https://github.com/discordrb/discordrb/pull/520), thanks @Daniel-Worrall)
|
275
|
+
- `Bot` now logs to `LOGGER.info` when the bot successfully resumes
|
276
|
+
- Code climate tooling is updated ([#489](https://github.com/discordrb/discordrb/pull/489), thanks @PanisSupraOmnia)
|
277
|
+
- `Bot#parse_mention` will now return an `Emoji` object for a mention of an emoji the bot isn't connected to ([#473](https://github.com/discordrb/discordrb/pull/473))
|
278
|
+
- The changelog now follows the "Keep a Changelog" format ([#504](https://github.com/discordrb/discordrb/pull/504), thanks @connorshea)
|
279
|
+
- `Bot#run` documentation is adjusted to clarify the use of its async argument ([#521](https://github.com/discordrb/discordrb/pull/521))
|
280
|
+
- **(breaking change)** `Bot#join` is renamed to `Bot#accept_invite` ([#521](https://github.com/discordrb/discordrb/pull/521))
|
281
|
+
- `Embed#colour=`/`Embed#color=` now accepts instances of `ColourRGB`/`ColorRGB` ([#523](https://github.com/discordrb/discordrb/pull/523))
|
282
|
+
- `Gateway` now performs certificate validation, and enforces use of TLSv1.2. If you experience issues (please report them!), you can return to the old codepath by setting `DISCORDRB_SSL_VERIFY_NONE` ([#528](https://github.com/discordrb/discordrb/pull/528), thanks @cky)
|
283
|
+
- Documentation clarifications around `voice_state_update`, `member_update`, and `server_create` ([#531](https://github.com/discordrb/discordrb/pull/531))
|
284
|
+
- URLs listed across the code base now use https, various other cleanups ([#540](https://github.com/discordrb/discordrb/pull/540), thanks @PanisSupraOmnia)
|
285
|
+
- Dependency on the `ffi` gem is restricted to `>= 1.9.24` to prevent a security exploit on Windows, per [CVE-2018-1000201](https://nvd.nist.gov/vuln/detail/CVE-2018-1000201) ([#544](https://github.com/discordrb/discordrb/pull/544))
|
286
|
+
- Warnings about accessing cached data after server streaming times out are now clarified and printed when accessing relevant methods ([#578](https://github.com/discordrb/discordrb/pull/578), thanks @connorshea)
|
287
|
+
|
288
|
+
### Deprecated
|
289
|
+
|
290
|
+
- The existing awaits system is deprecated in favor of a simpler, synchronous system introduced in [#499](https://github.com/discordrb/discordrb/pull/499) ([#509](https://github.com/discordrb/discordrb/pull/509))
|
291
|
+
|
292
|
+
### Removed
|
293
|
+
|
294
|
+
- **(breaking change)** Unsupported `mentions` argument in Create Message API ([#420](https://github.com/discordrb/discordrb/pull/420))
|
295
|
+
- **(breaking change)** `TrueClass` is no longer an alias for `:debug` logging in `Bot#initialize`
|
296
|
+
|
297
|
+
### Fixed
|
298
|
+
|
299
|
+
- `Errors::MessageTooLong` is now raised correctly ([#325](https://github.com/discordrb/discordrb/pull/325), thanks @Daniel-Worrall)
|
300
|
+
- Certain `Reaction` related events properly inherit `Event` ([#329](https://github.com/discordrb/discordrb/pull/329), thanks @valeth)
|
301
|
+
- Permissions calculation now takes the server's `@everyone` role permissions into consideration (additional work by [#357](https://github.com/discordrb/discordrb/pull/357), thanks @mattantonelli)
|
302
|
+
- `Role#members` had a typo preventing it from working ([#340](https://github.com/discordrb/discordrb/pull/340))
|
303
|
+
- `Message#my_reactions` now correctly returns `Array<Reaction>` ([#342](https://github.com/discordrb/discordrb/pull/342))
|
304
|
+
- Several internal checks have been added to make bots more resilient to zombie connections
|
305
|
+
- Documentation for `TypingEvent` is now more accurate ([#367](https://github.com/discordrb/discordrb/pull/367), thanks @Snazzah)
|
306
|
+
- Corrected implementation of the `reason` parameter in various API ([#372](https://github.com/discordrb/discordrb/pull/372))
|
307
|
+
- `CommandBot`'s advanced functionality properly handles empty strings in certain settings ([#379](https://github.com/discordrb/discordrb/pull/379), thanks @LikeLakers2)
|
308
|
+
- Rate limit headers are processed correctly when running into certain API exceptions ([#440](https://github.com/discordrb/discordrb/pull/440), thanks @unleashy)
|
309
|
+
- Typos preventing `ArgumentError` from being raised when processing `arg_types` ([#400](https://github.com/discordrb/discordrb/pull/400), thanks @Daniel-Worrall)
|
310
|
+
- `Server#create_role` correctly accepts a `ColourRGB`/`ColorRGB` via `#combined`
|
311
|
+
- `EventContainer#add_handler` correctly adds handlers for events that haven't had internal storage created for them yet
|
312
|
+
- When a server is initially cached, its channels are now cached in a way that prevents REST exceptions from being raised when attempting to process gateway events with uncached channels as a subject ([#391](https://github.com/discordrb/discordrb/pull/391))
|
313
|
+
- Await event matching now considers specific subclasses, preventing certain awaits to be triggered wrongly on different events in the same class tree ([#431](https://github.com/discordrb/discordrb/pull/431))
|
314
|
+
- Bulk deleting messages properly filters out messages older than two weeks ([#439](https://github.com/discordrb/discordrb/pull/439), thanks @Emberwalker)
|
315
|
+
- Rate limiting when certain API errors occur are handled properly ([#440](https://github.com/discordrb/discordrb/pull/440), thanks @unleashy)
|
316
|
+
- Querying the cache for an unknown member no longer adds `nil` elements, which caused unexpected behavior ([#456](https://github.com/discordrb/discordrb/pull/456))
|
317
|
+
- Logging behaves correctly when token is an empty string ([#449](https://github.com/discordrb/discordrb/pull/449), thanks @Daniel-Worrall)
|
318
|
+
- Several typos in documentation ([#444](https://github.com/discordrb/discordrb/pull/444), thanks @ToppleKek)
|
319
|
+
- When possible, `User` objects are now cached from messages instead of making an API request that may fail
|
320
|
+
- `rest-client` is upgraded to `>= 2.1.0.rc1`, as `2.1.0` is completely broken on Windows with Ruby 2.5 ([#478](https://github.com/discordrb/discordrb/pull/478), thanks @Daniel-Worrall and @swarley)
|
321
|
+
- `EmbedAuthor` sets the correct instance variable for `proxy_icon_url`
|
322
|
+
- `ReactionEvent` correctly returns the server on which it occurred ([#484](https://github.com/discordrb/discordrb/pull/484), thanks @charagarlnad)
|
323
|
+
- `ServerRoleCreateEvent` no longer fails to match when supplying a `name` attribute ([#493](https://github.com/discordrb/discordrb/pull/493), [#506](https://github.com/discordrb/discordrb/pull/506), thanks @Daniel-Worrall and @micke)
|
324
|
+
- `PlayingEvent` now correctly returns `server` ([#486](https://github.com/discordrb/discordrb/pull/486), thanks @xTVaser)
|
325
|
+
- Roles will no longer be cached twice when using `Server#create_role` ([#488](https://github.com/discordrb/discordrb/pull/488))
|
326
|
+
- Race condition when creating event handlers inside of other event handlers ([#514](https://github.com/discordrb/discordrb/pull/514))
|
327
|
+
- Command chain execution is halted immediately if `execute_command` fails, fixing some possible errors that could occur with `advanced_functionality` ([#517](https://github.com/discordrb/discordrb/pull/517), thanks @unleashy)
|
328
|
+
- In the event non-existent role IDs are observed in a member object, they are ignored to prevent cache related errors ([#535](https://github.com/discordrb/discordrb/pull/535))
|
329
|
+
- `end_with` attribute in `MessageEventHandler` now accepts group-less regular expressions without throwing exceptions ([#571](https://github.com/discordrb/discordrb/pull/571), thanks @badBlackShark)
|
330
|
+
- `PresenceEvent` is correctly raised when dispatched ([#574](https://github.com/discordrb/discordrb/pull/574))
|
331
|
+
- `Attachment#initialize` correctly sets `@id` instance variable ([#575](https://github.com/discordrb/discordrb/pull/575), thanks @kandayo)
|
332
|
+
|
333
|
+
## [3.2.1] - 2017-02-18
|
334
|
+
[3.2.1]: https://github.com/discordrb/discordrb/releases/tag/v3.2.1
|
335
|
+
|
336
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.0.1...v3.2.1)
|
337
|
+
|
338
|
+
### Changed
|
339
|
+
- `Bot#stop` and `Gateway#stop` now explicitly return `nil`, for more convenient use in commands
|
340
|
+
- The API method to query for users has been removed as the endpoint no longer exists
|
341
|
+
- 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
|
+
- 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
|
+
|
344
|
+
### Fixed
|
345
|
+
- Fixed another bug with resumes that caused issues when resuming a zombie connection
|
346
|
+
- Fixed a bug that caused issues when playing short files ([#326](https://github.com/discordrb/discordrb/issues/316))
|
347
|
+
|
348
|
+
## [3.2.0.1] - 2017-01-29
|
349
|
+
[3.2.0.1]: https://github.com/discordrb/discordrb/releases/tag/v3.2.0.1
|
350
|
+
|
351
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.2.0...v3.2.0.1)
|
352
|
+
|
353
|
+
### Fixed
|
354
|
+
- Attempt to fix an issue that causes a strange problem with dependencies when installing discordrb
|
355
|
+
|
356
|
+
## [3.2.0] - 2017-01-29
|
357
|
+
[3.2.0]: https://github.com/discordrb/discordrb/releases/tag/v3.2.0
|
358
|
+
|
359
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.1.1...v3.2.0)
|
360
|
+
|
361
|
+
### Added
|
362
|
+
- Various parts of gateway error handling were improved, leading to significant stability improvements:
|
363
|
+
- A long standing bug was fixed that prevented resumes in most cases, which caused unnecessary reconnections.
|
364
|
+
- The error handler that handles problems with sending the raw data over TCP now catches errors more broadly.
|
365
|
+
- Heartbeat ACKs (opcode 11) are now checked, which allows the client to detect zombie connections early on. If this causes problems for you you can disable it using `bot.gateway.check_heartbeat_acks = false`.
|
366
|
+
- Received heartbeats are now properly handled again
|
367
|
+
- Added a client for webhooks, implemented as a separate gem `discordrb-webhooks`. This allows the creation of applications that only use webhooks without the overhead provided by the rest of discordrb. The gem is added as a dependency by normal discordrb so you don't need to install it separately if you're already using that.
|
368
|
+
- Adding, updating or deleting custom emoji is now supported ([#285](https://github.com/discordrb/discordrb/pull/285), thanks @Daniel-Worrall)
|
369
|
+
- 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
|
+
- `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
|
+
- 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 [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.
|
373
|
+
- 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
|
+
- Game types and stream URLs are now cached ([#297](https://github.com/discordrb/discordrb/issues/297))
|
375
|
+
- The default non-streaming game was changed to be `0` instead of `nil` ([#277](https://github.com/discordrb/discordrb/pull/277), thanks @zeyla)
|
376
|
+
- A method `Channel#delete_message` was added to support deleting single messages by ID without prior resolution.
|
377
|
+
- Permission overwrites can now be deleted from channels ([#268](https://github.com/discordrb/discordrb/pull/268), thanks @greenbigfrog)
|
378
|
+
- There is now a utility method `IDObject.synthesise` that creates snowflakes with specific timestamps out of thin air.
|
379
|
+
- Typing events are now respondable, so you can call `#respond` on them for example ([#270](https://github.com/discordrb/discordrb/pull/270), thanks @VxJasonxV)
|
380
|
+
- Message authors can now be `User` objects if a `Member` object could not be found or created ([#290](https://github.com/discordrb/discordrb/issues/290))
|
381
|
+
- Added two new events, `unknown` ([#288](https://github.com/discordrb/discordrb/issues/288)) and `raw`, that are raised for unknown dispatches and all dispatches, respectively.
|
382
|
+
- Bots can now be set to fully ignore other bots ([#257](https://github.com/discordrb/discordrb/pull/257), thanks @greenbigfrog)
|
383
|
+
- Voice state update events now have an `old_channel` property/attribute that denotes the previous channel the user was in in case of joining/moving/leaving.
|
384
|
+
- The default help command no longer shows commands the user can't use ([#275](https://github.com/discordrb/discordrb/pull/275), thanks @FormalHellhound)
|
385
|
+
- Updated the command example to no longer include user-specific stuff ([#260](https://github.com/discordrb/discordrb/issues/260))
|
386
|
+
- `Server#role` now resolves IDs, so they can be passed as strings if necessary.
|
387
|
+
|
388
|
+
### Fixed
|
389
|
+
- Fixed bots' shard settings being ignored in certain cases
|
390
|
+
- Parsing role mentions using `Bot#parse_mention` works properly now.
|
391
|
+
- Fixed some specific REST methods that were broken by the API module refactor ([#302](https://github.com/discordrb/discordrb/pull/302), thanks @LikeLakers2)
|
392
|
+
- Cached channel data is now updated properly on change ([#272](https://github.com/discordrb/discordrb/issues/272))
|
393
|
+
- Users' avatars are now updated properly on change ([#265](https://github.com/discordrb/discordrb/pull/265), thanks @Roughsketch)
|
394
|
+
- Fixed voice state tracking for newly created channels ([#292](https://github.com/discordrb/discordrb/issues/292))
|
395
|
+
- Fixed event attribute handling for PlayingEvent ([#303](https://github.com/discordrb/discordrb/pull/303), thanks @sven-strothoff)
|
396
|
+
- Getting specific emoji by ID no longer fails to resolve non-cached emoji ([#283](https://github.com/discordrb/discordrb/pull/283), thanks @greenbigfrog)
|
397
|
+
- Voice state update events no longer fail to be raised for users leaving channels, if the event handler had a channel attribute set ([#301](https://github.com/discordrb/discordrb/issues/301))
|
398
|
+
- Bots that don't define any events should work properly again
|
399
|
+
- Fixed error handling for messages over the character limit ([#276](https://github.com/discordrb/discordrb/issues/276))
|
400
|
+
- Fixed some specific log messages not being called properly ([#263](https://github.com/discordrb/discordrb/pull/263), thanks @Roughsketch)
|
401
|
+
- Fixed some edge case bugs in the default help command:
|
402
|
+
- In the case of too many commands to be sent in the channel, it no longer replies with "Sending help in PM!" when called from PM
|
403
|
+
- It no longer fails completely if called from PM if there are any commands that require server-specific checks ([#308](https://github.com/discordrb/discordrb/issues/308))
|
404
|
+
- Fixed a slight formatting mistake
|
405
|
+
- Quoted command arguments in `advanced_functionality` are no longer split by newline
|
406
|
+
- Fixed a specific edge case in command chain handling where handling commands with the same name as the chain delimiter was broken
|
407
|
+
|
408
|
+
## [3.1.1] - 2016-10-21
|
409
|
+
[3.1.1]: https://github.com/discordrb/discordrb/releases/tag/v3.1.1
|
410
|
+
|
411
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.1.0...v3.1.1)
|
412
|
+
|
413
|
+
### Fixed
|
414
|
+
- 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
|
+
|
416
|
+
## [3.1.0] - 2016-10-20
|
417
|
+
[3.1.0]: https://github.com/discordrb/discordrb/releases/tag/v3.1.0
|
418
|
+
|
419
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.2...v3.1.0)
|
420
|
+
|
421
|
+
### Added
|
422
|
+
- Emoji handling support ([#226](https://github.com/discordrb/discordrb/pull/226), thanks @greenbigfrog)
|
423
|
+
- 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
|
+
- The bulk deletion endpoint is now exposed directly using the `Channel#delete_messages` method ([#235](https://github.com/discordrb/discordrb/pull/235), thanks @z64)
|
425
|
+
- The internal settings fields for user statuses that cause statuses to persist across restarts can now be modified ([#233](https://github.com/discordrb/discordrb/pull/233), thanks @Daniel-Worrall)
|
426
|
+
- A few examples have been added to the docs ([#250](https://github.com/discordrb/discordrb/pull/250), thanks @SunDwarf)
|
427
|
+
- The specs have been improved; they're still not exhaustive by far but there are at least slightly more now.
|
428
|
+
|
429
|
+
### Fixed
|
430
|
+
- 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)
|
23
431
|
- Fixed logger token redaction.
|
24
|
-
- `unavailable_servers` should no longer crash the bot due to being nil in some cases ([#244](https://github.com/
|
25
|
-
- `Profile#on` for member resolution is now no longer overwritten by an alias for `#online` ([#247](https://github.com/
|
26
|
-
- A `CommandBot` without any commands should no longer crash when receiving a message that triggers it ([#242](https://github.com/
|
432
|
+
- `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)
|
433
|
+
- `Profile#on` for member resolution is now no longer overwritten by an alias for `#online` ([#247](https://github.com/discordrb/discordrb/pull/247), thanks @Daniel-Worrall)
|
434
|
+
- A `CommandBot` without any commands should no longer crash when receiving a message that triggers it ([#242](https://github.com/discordrb/discordrb/issues/242))
|
27
435
|
- Changing nicknames works again, it has apparently been broken in 3.0.0.
|
28
436
|
|
29
|
-
## 3.0.2
|
437
|
+
## [3.0.2] - 2016-10-07
|
438
|
+
[3.0.2]: https://github.com/discordrb/discordrb/releases/tag/v3.0.2
|
439
|
+
|
440
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.1...v3.0.2)
|
30
441
|
|
31
|
-
|
442
|
+
### Changed
|
443
|
+
- A small change to how CommandBot parameter lists are formatted ([#240](https://github.com/discordrb/discordrb/pull/240), thanks @FormalHellhound)
|
32
444
|
|
33
|
-
###
|
445
|
+
### Fixed
|
446
|
+
- 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)
|
34
447
|
|
35
|
-
|
448
|
+
## [3.0.1] - 2016-10-01
|
449
|
+
[3.0.1]: https://github.com/discordrb/discordrb/releases/tag/v3.0.1
|
36
450
|
|
37
|
-
|
451
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v3.0.0...v3.0.1)
|
38
452
|
|
39
453
|
A tiny update to support webhook-sent messages properly!
|
40
454
|
|
455
|
+
### Added
|
41
456
|
- Added the utility methods `Message#webhook?` and `User#webhook?` to check whether a message or a user belongs to a webhook
|
42
457
|
- Added `Message#webhook_id` to get the ID of the sending webhook for webhook messages
|
43
458
|
- Added the `webhook_commands` parameter to CommandBot that, if false (default true), prevents webhook-sent messages from being parsed and handled as commands.
|
44
459
|
|
45
|
-
###
|
46
|
-
|
460
|
+
### Fixed
|
47
461
|
- Fixed webhook-sent messages being ignored because their author couldn't be resolved.
|
48
462
|
- Fixed a minor performance problem where a CommandBot would create unnecessarily create redundant objects for every received message.
|
49
463
|
|
50
|
-
## 3.0.0
|
464
|
+
## [3.0.0] - 2016-09-30
|
465
|
+
[3.0.0]: https://github.com/discordrb/discordrb/releases/tag/v3.0.0
|
466
|
+
|
467
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.3...v3.0.0)
|
51
468
|
|
52
469
|
I didn't think there could possibly be a release larger than 2.0.0 was, but here it is! Including the respective release commit, there were 540 commits from 1.8.1 to 2.0.0, but a whopping 734 commits from 2.1.3 to 3.0.0.
|
53
470
|
|
54
471
|
As with 2.0.0, there are some breaking changes! They are, as always, highlighted in bold.
|
55
472
|
|
473
|
+
### Added
|
56
474
|
- **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).
|
57
475
|
- 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.**
|
58
|
-
- **User login using email and password has been removed**. Use a user token instead, see also [here](https://github.com/
|
59
|
-
- 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/
|
476
|
+
- **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).
|
477
|
+
- 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)
|
60
478
|
- **Custom prefix handlers for `CommandBot`s now get the full message object as their parameter rather than only the content**, for even more flexibility.
|
61
479
|
- 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.
|
62
|
-
- **The API module has undergone a refactor**, if you were using any manual API calls you will have to update them to the new format. Specifically, endpoints dealing with channels have been moved to `API::Channel`, ones dealing with users to `API::User` and so on. ([#203](https://github.com/
|
63
|
-
- **Calling `users` on a text channel will now only return users who have permission to read it** ([#186](https://github.com/
|
64
|
-
- A variety of new fields have been added to `Message` objects, specifically embeds (`Message#embeds`), when it was last edited (`#edited_timestamp`), whether it uses TTS (`#tts?`), its nonce (`#nonce`), whether it was ever edited (`#edited?`), and whether it mentions everyone (`mention_everyone?`) ([#206](https://github.com/
|
65
|
-
- A variety of new functionality has been added to `Server` and `Channel` objects ([#181](https://github.com/
|
480
|
+
- **The API module has undergone a refactor**, if you were using any manual API calls you will have to update them to the new format. Specifically, endpoints dealing with channels have been moved to `API::Channel`, ones dealing with users to `API::User` and so on. ([#203](https://github.com/discordrb/discordrb/pull/203), thanks @depl0y)
|
481
|
+
- **Calling `users` on a text channel will now only return users who have permission to read it** ([#186](https://github.com/discordrb/discordrb/issues/186))
|
482
|
+
- A variety of new fields have been added to `Message` objects, specifically embeds (`Message#embeds`), when it was last edited (`#edited_timestamp`), whether it uses TTS (`#tts?`), its nonce (`#nonce`), whether it was ever edited (`#edited?`), and whether it mentions everyone (`mention_everyone?`) ([#206](https://github.com/discordrb/discordrb/pull/206), thanks @SnazzyPine25)
|
483
|
+
- A variety of new functionality has been added to `Server` and `Channel` objects ([#181](https://github.com/discordrb/discordrb/pull/181), thanks @SnazzyPine25):
|
66
484
|
- Bitrate and user limit can now be read and set for voice channels
|
67
485
|
- Server integrations can now be read
|
68
486
|
- Server features and verification level can now be read
|
69
487
|
- Utility functions to generate widget, widget banner and splash URLs
|
70
|
-
- Message pinning is now supported, both reading pin status and pinning existing messages ([#145](https://github.com/
|
488
|
+
- Message pinning is now supported, both reading pin status and pinning existing messages ([#145](https://github.com/discordrb/discordrb/issues/145) / [#146](https://github.com/discordrb/discordrb/pull/146), thanks @hlaaftana)
|
71
489
|
- Support for the new available statuses:
|
72
490
|
- `Bot#dnd` to make the bot show up as DnD (red dot)
|
73
491
|
- `Bot#invisible` to make the bot show up as offline
|
74
|
-
- Setting the bot's status to streaming is now supported ([#128](https://github.com/
|
75
|
-
- You can now set a message to be sent when a `CommandBot`'s command fails with a `NoPermission` error ([#200](https://github.com/
|
76
|
-
- There is now an optional field to list the parameters a command can accept ([#201](https://github.com/
|
77
|
-
- Commands can now have an array of roles set that are required to be able to use it ([#178](https://github.com/
|
78
|
-
- Methods like `CommandEvent#<<` for quickly responding to an event are now available in `MessageEvent` too ([#154](https://github.com/
|
79
|
-
- Temporary messages, that automatically delete after some time, can now be sent to channels ([#136](https://github.com/
|
80
|
-
- Captions can now be sent together with files, and files can be attached to events to be sent on completion ([#130](https://github.com/
|
81
|
-
- There is now a `Channel#load_message` method to get a single message by its ID ([#174](https://github.com/
|
82
|
-
- `Channel#define_overwrite` can now be used with a `Profile` object, together with some internal changes ([#232](https://github.com/
|
83
|
-
- There are now endpoint methods to list a server's channels and channel invites ([#197](https://github.com/
|
84
|
-
- Two methods, `Member#roles=` and `Member#modify_roles` to manipulate a member's roles in a more advanced way have been added ([#223](https://github.com/
|
492
|
+
- Setting the bot's status to streaming is now supported ([#128](https://github.com/discordrb/discordrb/pull/128) and [#143](https://github.com/discordrb/discordrb/pull/143), thanks @SnazzyPine25 and @barkerja)
|
493
|
+
- You can now set a message to be sent when a `CommandBot`'s command fails with a `NoPermission` error ([#200](https://github.com/discordrb/discordrb/pull/200), thanks @PoVa)
|
494
|
+
- There is now an optional field to list the parameters a command can accept ([#201](https://github.com/discordrb/discordrb/pull/201), thanks @FormalHellhound)
|
495
|
+
- Commands can now have an array of roles set that are required to be able to use it ([#178](https://github.com/discordrb/discordrb/pull/178), thanks @PoVa)
|
496
|
+
- Methods like `CommandEvent#<<` for quickly responding to an event are now available in `MessageEvent` too ([#154](https://github.com/discordrb/discordrb/pull/154), thanks @hlaaftana)
|
497
|
+
- Temporary messages, that automatically delete after some time, can now be sent to channels ([#136](https://github.com/discordrb/discordrb/issues/136) / [#139](https://github.com/discordrb/discordrb/pull/139), thanks @unleashy)
|
498
|
+
- Captions can now be sent together with files, and files can be attached to events to be sent on completion ([#130](https://github.com/discordrb/discordrb/pull/130), thanks @SnazzyPine25)
|
499
|
+
- There is now a `Channel#load_message` method to get a single message by its ID ([#174](https://github.com/discordrb/discordrb/pull/174), thanks @z64)
|
500
|
+
- `Channel#define_overwrite` can now be used with a `Profile` object, together with some internal changes ([#232](https://github.com/discordrb/discordrb/issues/232))
|
501
|
+
- There are now endpoint methods to list a server's channels and channel invites ([#197](https://github.com/discordrb/discordrb/pull/197))
|
502
|
+
- Two methods, `Member#roles=` and `Member#modify_roles` to manipulate a member's roles in a more advanced way have been added ([#223](https://github.com/discordrb/discordrb/pull/223), thanks @z64)
|
85
503
|
- Role mentionability can now be set using `Role#mentionable=`
|
86
|
-
- The current bot's OAuth application can now be read ([#175](https://github.com/
|
87
|
-
- You can now mute and deafen other members ([#157](https://github.com/
|
88
|
-
- The internal `Logger` now supports writing to a file instead of STDOUT ([#171](https://github.com/
|
89
|
-
- Building on top of that, you can also write to multiple streams at the same time now, in case you want to have input on both a file and STDOUT, or even more advanced setups. ([#217](https://github.com/
|
90
|
-
- Roles can now have their permissions bitfield set directly ([#177](https://github.com/
|
91
|
-
- The `Bot#invite_url` method now supports adding permission bits into the generated URL ([#218](https://github.com/
|
92
|
-
- A utility method `User#send_file` has been added to directly send a file to a user in PM ([#168](https://github.com/
|
93
|
-
- You can now get the list of members that have a particular role assigned using `Role#members` ([#147](https://github.com/
|
94
|
-
- You can now check whether a `VoiceBot` is playing right now using `#playing?` ([#137](https://github.com/
|
95
|
-
- You can now get the channel a `VoiceBot` is playing on ([#138](https://github.com/
|
96
|
-
- The permissions bit map has been updated for emoji, "Administrator" and nickname changes ([#180](https://github.com/
|
504
|
+
- The current bot's OAuth application can now be read ([#175](https://github.com/discordrb/discordrb/pull/175), thanks @SnazzyPine25)
|
505
|
+
- You can now mute and deafen other members ([#157](https://github.com/discordrb/discordrb/pull/157), thanks @SnazzyPine25)
|
506
|
+
- The internal `Logger` now supports writing to a file instead of STDOUT ([#171](https://github.com/discordrb/discordrb/issues/171))
|
507
|
+
- Building on top of that, you can also write to multiple streams at the same time now, in case you want to have input on both a file and STDOUT, or even more advanced setups. ([#217](https://github.com/discordrb/discordrb/pull/217), thanks @PoVa)
|
508
|
+
- Roles can now have their permissions bitfield set directly ([#177](https://github.com/discordrb/discordrb/issues/177))
|
509
|
+
- The `Bot#invite_url` method now supports adding permission bits into the generated URL ([#218](https://github.com/discordrb/discordrb/pull/218), thanks @PoVa)
|
510
|
+
- A utility method `User#send_file` has been added to directly send a file to a user in PM ([#168](https://github.com/discordrb/discordrb/issues/168) / [#172](https://github.com/discordrb/discordrb/pull/172), thanks @SnazzyPine25)
|
511
|
+
- You can now get the list of members that have a particular role assigned using `Role#members` ([#147](https://github.com/discordrb/discordrb/pull/147), thanks @hlaaftana)
|
512
|
+
- You can now check whether a `VoiceBot` is playing right now using `#playing?` ([#137](https://github.com/discordrb/discordrb/pull/137), thanks @SnazzyPine25)
|
513
|
+
- You can now get the channel a `VoiceBot` is playing on ([#138](https://github.com/discordrb/discordrb/pull/138), thanks @snapcase)
|
514
|
+
- The permissions bit map has been updated for emoji, "Administrator" and nickname changes ([#180](https://github.com/discordrb/discordrb/pull/180), thanks @megumisonoda)
|
97
515
|
- A method `Bot#connected?` has been added to check whether the bot is currently connected to the gateway.
|
98
516
|
- 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.
|
99
|
-
- 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/
|
100
|
-
- 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/
|
517
|
+
- 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/discordapp/discord-api-docs/issues/108).
|
101
519
|
- Rogue presences, i.e. presences without an associated cached member, now print a log message instead of being completely ignored
|
102
520
|
- A variety of aliases have been added to existing methods.
|
103
521
|
- An example to show off voice sending has been added to the repo, and existing examples have been improved.
|
104
522
|
- A large amount of fixes and clarifications have been made to the docs.
|
105
523
|
|
106
|
-
###
|
107
|
-
|
524
|
+
### Fixed
|
108
525
|
- The almost a year old bug where changing the own user's username would reset its avatar has finally been fixed.
|
109
|
-
- The issue where resolving a large server with the owner offline would sometimes cause a stack overflow has been fixed ([#169](https://github.com/
|
526
|
+
- 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)
|
110
527
|
- 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.
|
111
|
-
- A message's author will be resolved over the REST API like other objects in case it's not cached yet. This should fix all instances of "Member not cached even thought it should be". ([#210](https://github.com/
|
112
|
-
- Voice state handling has been completely redone, fixing a variety of caching issues. ([#159](https://github.com/
|
113
|
-
- Getting a voice channel's users no longer does a chunk request ([#142](https://github.com/
|
528
|
+
- A message's author will be resolved over the REST API like other objects in case it's not cached yet. This should fix all instances of "Member not cached even thought it should be". ([#210](https://github.com/discordrb/discordrb/pull/210), thanks @megumisonoda)
|
529
|
+
- Voice state handling has been completely redone, fixing a variety of caching issues. ([#159](https://github.com/discordrb/discordrb/issues/159))
|
530
|
+
- Getting a voice channel's users no longer does a chunk request ([#142](https://github.com/discordrb/discordrb/issues/142))
|
114
531
|
- `Channel#define_overwrite` can now be used to define user overwrites, apparently that didn't work at all before
|
115
|
-
- Nested command chains where an inner command doesn't exist now no longer crash the command chain handler ([#215](https://github.com/
|
116
|
-
- Gateway errors should no longer spam the console ([#141](https://github.com/
|
532
|
+
- Nested command chains where an inner command doesn't exist now no longer crash the command chain handler ([#215](https://github.com/discordrb/discordrb/issues/215))
|
533
|
+
- Gateway errors should no longer spam the console ([#141](https://github.com/discordrb/discordrb/issues/141) / [#148](https://github.com/discordrb/discordrb/pull/148), thanks @meew0)
|
117
534
|
- Role hoisting (both setting and reading it) should now work properly
|
118
535
|
- The `VoiceBot#stop_playing` method should now work more predictably
|
119
|
-
- Voice states with a nil channel should no longer crash when accessed ([#183](https://github.com/
|
536
|
+
- Voice states with a nil channel should no longer crash when accessed ([#183](https://github.com/discordrb/discordrb/pull/183), thanks @Apexal)
|
120
537
|
- A latent bug in how PM channels were cached is fixed, previously they were cached twice - once by channel ID and once by recipient ID. Now they're only cached by recipient ID.
|
121
538
|
- Two problems in how Discord outages are handled are now fixed; the bot should now no longer break when one happens. Specifically, the fixed problems are:
|
122
539
|
- `GUILD_DELETE` events for unavailable servers are now ignored
|
123
540
|
- Opcode 9 packets which are received while no session currently exists are handled correctly
|
124
|
-
- A possible regression in PM channel creation was fixed. ([#227](https://github.com/
|
541
|
+
- 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)
|
125
542
|
|
126
|
-
## 2.1.3
|
543
|
+
## [2.1.3] - 2016-06-11
|
544
|
+
[2.1.3]: https://github.com/discordrb/discordrb/releases/tag/v2.1.3
|
127
545
|
|
128
|
-
|
546
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.2...v2.1.3)
|
129
547
|
|
130
|
-
###
|
548
|
+
### Fixed
|
549
|
+
- 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
|
+
- A mistake in the documentation was fixed ([#140](https://github.com/discordrb/discordrb/issues/140))
|
551
|
+
- 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
|
+
- 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))
|
131
553
|
|
132
|
-
|
133
|
-
|
134
|
-
- 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/meew0/discordrb/issues/129))
|
135
|
-
- 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/meew0/discordrb/issues/134))
|
554
|
+
## [2.1.2] - 2016-05-29
|
555
|
+
[2.1.2]: https://github.com/discordrb/discordrb/releases/tag/v2.1.2
|
136
556
|
|
137
|
-
|
557
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.1...v2.1.2)
|
138
558
|
|
559
|
+
### Added
|
139
560
|
- A reader was added (`Bot#awaits`) to read the hash of awaits, so ones that aren't necessary anymore can be deleted.
|
140
|
-
- `Channel#prune` now uses the bulk delete endpoint which means it will be much faster and no longer rate limited ([#118](https://github.com/
|
141
|
-
|
142
|
-
### Bugfixes
|
561
|
+
- `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)
|
143
562
|
|
563
|
+
### Fixed
|
144
564
|
- A few unresolved links in the documentation were fixed.
|
145
565
|
- The tracking of streamed servers was updated so that very long lists of servers should now all be processed.
|
146
|
-
- 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/
|
147
|
-
- In the rare event that Discord sends a voice state update for a nonexistent member, there should no longer be a gateway error ([#125](https://github.com/
|
148
|
-
- Network errors (`EPIPE` and the like) should no longer cause an exception while processing ([#127](https://github.com/
|
566
|
+
- 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)
|
567
|
+
- In the rare event that Discord sends a voice state update for a nonexistent member, there should no longer be a gateway error ([#125](https://github.com/discordrb/discordrb/issues/125))
|
568
|
+
- Network errors (`EPIPE` and the like) should no longer cause an exception while processing ([#127](https://github.com/discordrb/discordrb/issues/127))
|
149
569
|
- Uncached members in messages are now logged.
|
150
570
|
|
151
|
-
## 2.1.1
|
571
|
+
## [2.1.1] - 2016-05-08
|
572
|
+
[2.1.1]: https://github.com/discordrb/discordrb/releases/tag/v2.1.1
|
152
573
|
|
153
|
-
|
574
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.1.0...v2.1.1)
|
154
575
|
|
155
|
-
###
|
576
|
+
### Fixed
|
577
|
+
- Fixed a caching error that occurred when deleting roles ([#113](https://github.com/discordrb/discordrb/issues/113))
|
578
|
+
- Commands should no longer be triggered with nil authors ([#114](https://github.com/discordrb/discordrb/issues/114))
|
156
579
|
|
157
|
-
|
158
|
-
|
580
|
+
## [2.1.0] - 2016-04-30
|
581
|
+
[2.1.0]: https://github.com/discordrb/discordrb/releases/tag/v2.1.0
|
159
582
|
|
160
|
-
|
583
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.4...v2.1.0)
|
161
584
|
|
162
|
-
|
585
|
+
### Added
|
586
|
+
- 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))
|
163
587
|
- Members' nicknames can now be set and read (`Member#nick`) and updates to them are being tracked.
|
164
588
|
- Roles now have a `mentionable?` property and a `mention` utility method.
|
165
589
|
- `Message` now tracks a message's role mentions.
|
166
590
|
- The internal REST rate limit handler was updated:
|
167
|
-
- It now tracks message rate limits server wide to properly handle new bot account rate limits. ([#100](https://github.com/
|
591
|
+
- It now tracks message rate limits server wide to properly handle new bot account rate limits. ([#100](https://github.com/discordrb/discordrb/issues/100))
|
168
592
|
- 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.
|
169
|
-
- Guild sharding is now supported using the optional `shard_id` and `num_shards` to bot initializers. Read about it here: https://github.com/
|
170
|
-
- 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/
|
171
|
-
- A `heartbeat` event was added that gets triggered every now and then to allow for roughly periodic actions. ([#110](https://github.com/
|
172
|
-
- 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/
|
593
|
+
- 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))
|
594
|
+
- 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
|
+
- 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
|
+
- 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))
|
173
597
|
|
174
|
-
## 2.0.4
|
598
|
+
## [2.0.4] - 2016-04-19
|
599
|
+
[2.0.4]: https://github.com/discordrb/discordrb/releases/tag/v2.0.4
|
175
600
|
|
176
|
-
|
601
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.3...v2.0.4)
|
177
602
|
|
178
|
-
###
|
603
|
+
### Added
|
604
|
+
- Added a utility method `Invite#url` ([#86](https://github.com/discordrb/discordrb/issues/86)/[#101](https://github.com/discordrb/discordrb/pull/101), thanks @PoVa)
|
179
605
|
|
180
|
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
606
|
+
### Fixed
|
607
|
+
- 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
|
+
- Setting avatars should now work again on Windows ([#96](https://github.com/discordrb/discordrb/issues/96))
|
609
|
+
- Message edit events should no longer be raised with nil authors ([#95](https://github.com/discordrb/discordrb/issues/95))
|
610
|
+
- Invites can now be created again ([#87](https://github.com/discordrb/discordrb/issues/87))
|
611
|
+
- Voice states are now preserved for chunked members, fixes an issue where a voice channel's users would ignore all voice states that occurred before the call ([#103](https://github.com/discordrb/discordrb/issues/103))
|
185
612
|
- Fixed some possible problems with heartbeats not being sent with unstable connections
|
186
613
|
|
187
|
-
## 2.0.3
|
614
|
+
## [2.0.3] - 2016-04-15
|
615
|
+
[2.0.3]: https://github.com/discordrb/discordrb/releases/tag/v2.0.3
|
188
616
|
|
189
|
-
|
190
|
-
- The message that occurs when a command is missing permission can now be changed or disabled ([#94](https://github.com/meew0/discordrb/pull/94), thanks @snapcase)
|
191
|
-
- The log message that occurs when you disconnect from the WebSocket is now more compact ([#90](https://github.com/meew0/discordrb/issues/90))
|
192
|
-
- `Bot#ignored?` now exists to check whether a user is ignored
|
617
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.2...v2.0.3)
|
193
618
|
|
194
|
-
###
|
619
|
+
### Added
|
620
|
+
- All examples now fully use v2 ([#92](https://github.com/discordrb/discordrb/pull/92), thanks @snapcase)
|
621
|
+
- 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
|
+
- The log message that occurs when you disconnect from the WebSocket is now more compact ([#90](https://github.com/discordrb/discordrb/issues/90))
|
623
|
+
- `Bot#ignored?` now exists to check whether a user is ignored
|
195
624
|
|
196
|
-
|
197
|
-
-
|
625
|
+
### Fixed
|
626
|
+
- A problem where getting channel history would sometimes cause an exception has been fixed ([#88](https://github.com/discordrb/discordrb/issues/88))
|
627
|
+
- `split_message` should now behave correctly in a specific edge case ([#85](https://github.com/discordrb/discordrb/pull/85), thanks @AnhNhan)
|
198
628
|
- DCA playback should no longer cause an error when playback ends due to a specific reason
|
199
629
|
|
200
|
-
## 2.0.2
|
630
|
+
## [2.0.2] - 2016-04-10
|
631
|
+
[2.0.2]: https://github.com/discordrb/discordrb/releases/tag/v2.0.2
|
632
|
+
|
633
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.1...v2.0.2)
|
201
634
|
|
202
|
-
|
203
|
-
- Added `Server#
|
204
|
-
- Added `
|
635
|
+
### Added
|
636
|
+
- Added `Server#text_channels` and `#voice_channels` ([#79](https://github.com/discordrb/discordrb/issues/79))
|
637
|
+
- Added `Server#online_users` ([#80](https://github.com/discordrb/discordrb/issues/80))
|
638
|
+
- Added `Member#role?` ([#83](https://github.com/discordrb/discordrb/issues/83))
|
205
639
|
- Added three utility methods `User#online?`, `#offline?`, and `#idle?`
|
206
640
|
- `Bot#send_message` can now take channel objects as well as the ID
|
207
641
|
|
208
|
-
###
|
209
|
-
|
642
|
+
### Fixed
|
210
643
|
- Removing the bot from a server will no longer result in a gateway message error
|
211
644
|
- Fixed an exception raised if a previously unavailable guild goes online after the stream timeout
|
212
645
|
- `server_create` will no longer be raised for newly available guilds
|
213
646
|
- Fixed the annoying message about constant reassignment at startup
|
214
647
|
- Fixed an error where rarely a server's owner wouldn't be initialized correctly
|
215
648
|
|
216
|
-
## 2.0.1
|
649
|
+
## [2.0.1] - 2016-04-10
|
650
|
+
[2.0.1]: https://github.com/discordrb/discordrb/releases/tag/v2.0.1
|
651
|
+
|
652
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v2.0.0...v2.0.1)
|
217
653
|
|
218
|
-
|
654
|
+
### Added
|
655
|
+
- Added some more examples ([#75](https://github.com/discordrb/discordrb/pull/75), thanks @greenbigfrog)
|
219
656
|
- Users can now be ignored from messages at gateway level (`Bot#ignore_user`, `Bot#unignore_user`)
|
220
657
|
- `Member#add_role` and `Member#remove_role` were re-added from User - they were missing before
|
221
658
|
|
222
|
-
###
|
223
|
-
|
659
|
+
### Fixed
|
224
660
|
- Fixed some typos in the documentation
|
225
661
|
- If a server is actually unavailable it will no longer spam the console with timeout messages
|
226
662
|
- 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.
|
227
663
|
- Fixed a bug where playing something right after connecting to voice would sometimes cause the encryption key to not be set
|
228
664
|
|
229
|
-
## 2.0.0
|
665
|
+
## [2.0.0] - 2016-04-08
|
666
|
+
[2.0.0]: https://github.com/discordrb/discordrb/releases/tag/v2.0.0
|
230
667
|
|
668
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.8.1...v2.0.0)
|
669
|
+
|
670
|
+
### Added
|
231
671
|
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.
|
232
672
|
|
233
673
|
- **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:
|
@@ -286,29 +726,37 @@ puts bot.profile.username
|
|
286
726
|
- The `User#discriminator` attribute now has more aliases (`#tag`, `#discord_tag`, `#discrim`)
|
287
727
|
- `Permission` objects can now be created or set even without a role writer, useful to quickly get byte representations of permissions
|
288
728
|
- Permission overwrites can now be defined more easily using the utility method `Channel#define_overwrite`
|
289
|
-
- `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/
|
290
|
-
- The `:with_text` event attribute is now aliased to `:exact_text` ([#65](https://github.com/
|
729
|
+
- `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))
|
730
|
+
- The `:with_text` event attribute is now aliased to `:exact_text` ([#65](https://github.com/discordrb/discordrb/issues/65))
|
291
731
|
- Server icons (`Server#icon=`) can now be set just like avatars (`Profile#avatar=`)
|
292
732
|
- Lots of comments were added to the examples and some bugs fixed
|
293
733
|
- The overall performance and memory usage was improved, especially on Ruby 2.3 (using the new frozen string literal comment)
|
294
734
|
- The documentation was slightly improved.
|
295
735
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
736
|
+
### Fixed
|
737
|
+
- 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
|
+
- **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
|
+
- Permission calculation (`User#permission?`) has been thoroughly rewritten and should now account for edge cases like server owners and Manage Permissions.
|
740
|
+
- 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.
|
741
|
+
- Commands with aliases now show up correctly in the auto-generated help command ([#72](https://github.com/discordrb/discordrb/issues/72))
|
742
|
+
- The auto-generated help command can now actually be disabled by setting the corresponding attribute to nil ([#73](https://github.com/discordrb/discordrb/issues/73))
|
743
|
+
- Including empty containers now does nothing instead of raising an error
|
744
|
+
- Command bots now obey `should_parse_self`
|
745
|
+
|
746
|
+
## [1.8.1] - 2016-03-11
|
747
|
+
[1.8.1]: https://github.com/discordrb/discordrb/releases/tag/v1.8.1
|
305
748
|
|
306
|
-
|
749
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.8.0...v1.8.1)
|
307
750
|
|
308
|
-
###
|
751
|
+
### Fixed
|
309
752
|
* 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.
|
310
753
|
|
311
|
-
## 1.8.0
|
754
|
+
## [1.8.0] - 2016-03-11
|
755
|
+
[1.8.0]: https://github.com/discordrb/discordrb/releases/tag/v1.8.0
|
756
|
+
|
757
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.5...v1.8.0)
|
758
|
+
|
759
|
+
### Added
|
312
760
|
* The built-in logger has been somewhat redone.
|
313
761
|
* 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.
|
314
762
|
* It now supports more things than just `debug`, there's also `warn`, `error`, `good`, `info`, `in`, and `out`.
|
@@ -319,102 +767,157 @@ puts bot.profile.username
|
|
319
767
|
* `Channel#mention` was added that mentions a channel analogous to `User#mention`.
|
320
768
|
* The aliases `tag` and `discord_tag` have been added to the discriminator because that's what Discord calls them now.
|
321
769
|
|
322
|
-
###
|
770
|
+
### Fixed
|
323
771
|
* A problem some users had where voice playback would leak FFmpeg processes has been fixed.
|
324
772
|
* The VWS internal thread now has a name in debug messages (`vws-i`)
|
325
773
|
* Users' voice channels should now always be set if they are in one
|
326
774
|
|
327
|
-
## 1.7.5
|
775
|
+
## [1.7.5] - 2016-03-03
|
776
|
+
[1.7.5]: https://github.com/discordrb/discordrb/releases/tag/v1.7.5
|
777
|
+
|
778
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.4...v1.7.5)
|
779
|
+
|
780
|
+
### Changed
|
328
781
|
* `Channel#send_message` and `Bot#send_message` now have an extra `tts` parameter (false by default) to specify whether the message should use TTS.
|
329
782
|
|
330
|
-
###
|
783
|
+
### Fixed
|
331
784
|
* Attempting to `p` a data class, especially a `User` or `Profile`, should no longer lock up the interpreter due to very deep recursion.
|
332
785
|
* Manual TTS using `API.send_message` will now work correctly.
|
333
786
|
|
334
|
-
## 1.7.4
|
787
|
+
## [1.7.4] - 2016-02-28
|
788
|
+
[1.7.4]: https://github.com/discordrb/discordrb/releases/tag/v1.7.4
|
789
|
+
|
790
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.3...v1.7.4)
|
791
|
+
|
792
|
+
### Added
|
335
793
|
* Added methods `Channel#text?` and `Channel#voice?` to check a channel's type.
|
336
794
|
* Frequently allocated strings have been turned into symbols or frozen constants, this should improve performance slightly.
|
337
795
|
|
338
|
-
###
|
796
|
+
### Fixed
|
339
797
|
* `VoiceBot#destroy` will now properly disconnect you and should no longer cause segfaults.
|
340
798
|
* Fixed a bug where you couldn't set any settings on a role created using `Server#create_role`.
|
341
799
|
* Fixed `Profile#avatar=` doing absolutely nothing.
|
342
800
|
|
343
|
-
## 1.7.3
|
801
|
+
## [1.7.3] - 2016-02-27
|
802
|
+
[1.7.3]: https://github.com/discordrb/discordrb/releases/tag/v1.7.3
|
803
|
+
|
804
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.2...v1.7.3)
|
805
|
+
|
806
|
+
### Added
|
344
807
|
* The server banlist can now be accessed more nicely using `Server#bans`.
|
345
808
|
* 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.
|
346
809
|
|
347
|
-
## 1.7.2
|
810
|
+
## [1.7.2] - 2016-02-25
|
811
|
+
[1.7.2]: https://github.com/discordrb/discordrb/releases/tag/v1.7.2
|
812
|
+
|
813
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.1...v1.7.2)
|
814
|
+
|
815
|
+
### Changed
|
348
816
|
* The `bot` object can now be read from all events, not just from command ones.
|
349
817
|
* 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.
|
350
818
|
|
351
|
-
## 1.7.1
|
819
|
+
## [1.7.1] - 2016-02-23
|
820
|
+
[1.7.1]: https://github.com/discordrb/discordrb/releases/tag/v1.7.1
|
821
|
+
|
822
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.7.0...v1.7.1)
|
823
|
+
|
824
|
+
### Added
|
352
825
|
* 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.)
|
353
826
|
|
354
|
-
###
|
827
|
+
### Fixed
|
355
828
|
* The tokens will now be verified correctly when obtained from the cache. (I messed up last time)
|
356
829
|
* Events of the same type in different containers will now be merged correctly when including both containers.
|
357
830
|
* 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)
|
358
831
|
|
359
|
-
## 1.7.0
|
832
|
+
## [1.7.0] - 2016-02-23
|
833
|
+
[1.7.0]: https://github.com/discordrb/discordrb/releases/tag/v1.7.0
|
834
|
+
|
835
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.6...v1.7.0)
|
836
|
+
|
837
|
+
### Added
|
360
838
|
* **`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.
|
361
|
-
* The in-line documentation using Yard is now complete and can be [accessed at RubyDoc](
|
839
|
+
* 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.
|
362
840
|
* Events and commands can now be thoroughly modularized using a system I call 'containers'. (TODO: Add a tutorial here later)
|
363
841
|
* Support for the latest API changes:
|
364
842
|
* `Server.leave` does something different than `Server.delete`
|
365
843
|
* The WebSocket connection now uses version 3 of the protocol
|
366
|
-
* Voice bots now support playing DCA files using the [`play_dca`](
|
367
|
-
* The [volume](
|
844
|
+
* 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)
|
845
|
+
* 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.
|
368
846
|
* 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.)
|
369
|
-
* [`Server#members`](
|
370
|
-
* An attribute [`Server#member_count`](
|
371
|
-
* An attribute [`Server#large?`](
|
847
|
+
* [`Server#members`](https://www.rubydoc.info/github/discordrb/discordrb/master/Discordrb%2FServer%3Amembers) is now aliased to `users`.
|
848
|
+
* 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.
|
849
|
+
* 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.
|
372
850
|
* Some more specific error classes have been added to replace the RestClient generic ones.
|
373
851
|
* Quickly sending a message using the `event << 'text'` syntax now works in every type of message event, not just commands.
|
374
|
-
* You can now set the bitrate of sent audio data using `bot.voice.encoder.bitrate = 64000` (see [`Encoder#bitrate=`](
|
375
|
-
* A rate limiting feature was added to commands - you can define buckets using the [`bucket`](
|
376
|
-
* A [`SimpleRateLimiter`](
|
852
|
+
* 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.
|
853
|
+
* 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).
|
854
|
+
* 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)
|
377
855
|
* Connecting to the WebSocket now uses an exponential falloff system so we don't spam Discord with requests anymore.
|
378
856
|
* Debug timestamps are now accurate to milliseconds.
|
379
857
|
|
380
|
-
|
381
|
-
### Bugfixes
|
858
|
+
### Fixed
|
382
859
|
* The token cacher will now detect whether a cached token has been invalidated due to a password change.
|
383
860
|
* `break`ing from an event or command will no longer spew `LocalJumpError`s to the console.
|
384
861
|
|
385
|
-
## 1.6.6
|
862
|
+
## [1.6.6] - 2016-02-13
|
863
|
+
[1.6.6]: https://github.com/discordrb/discordrb/releases/tag/v1.6.6
|
864
|
+
|
865
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.5...v1.6.6)
|
386
866
|
|
387
|
-
###
|
867
|
+
### Fixed
|
388
868
|
* Fixed a problem that would cause an incompatibility with Ruby 2.1
|
389
869
|
* Fixed servers sometimes containing duplicate members
|
390
870
|
|
391
|
-
## 1.6.5
|
871
|
+
## [1.6.5] - 2016-02-12
|
872
|
+
[1.6.5]: https://github.com/discordrb/discordrb/releases/tag/v1.6.5
|
873
|
+
|
874
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.4...v1.6.5)
|
875
|
+
|
876
|
+
### Changed
|
392
877
|
* 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).
|
393
878
|
|
394
|
-
## 1.6.4
|
879
|
+
## [1.6.4] - 2016-02-10
|
880
|
+
[1.6.4]: https://github.com/discordrb/discordrb/releases/tag/v1.6.4
|
881
|
+
|
882
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.3...v1.6.4)
|
395
883
|
|
396
|
-
###
|
884
|
+
### Fixed
|
397
885
|
* Fixed a bug that made the joining of servers using an invite impossible.
|
398
886
|
|
399
|
-
## 1.6.3
|
887
|
+
## [1.6.3] - 2016-02-08
|
888
|
+
[1.6.3]: https://github.com/discordrb/discordrb/releases/tag/v1.6.3
|
400
889
|
|
401
|
-
|
890
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.2...v1.6.3)
|
891
|
+
|
892
|
+
### Fixed
|
402
893
|
* Fixed a bug that prevented the banning of users over the API
|
403
894
|
|
404
|
-
## 1.6.2
|
895
|
+
## [1.6.2] - 2016-02-06
|
896
|
+
[1.6.2]: https://github.com/discordrb/discordrb/releases/tag/v1.6.2
|
897
|
+
|
898
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.1...v1.6.2)
|
405
899
|
|
406
|
-
###
|
900
|
+
### Fixed
|
407
901
|
* 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.
|
408
902
|
|
409
|
-
## 1.6.1
|
903
|
+
## [1.6.1] - 2016-02-04
|
904
|
+
[1.6.1]: https://github.com/discordrb/discordrb/releases/tag/v1.6.1
|
905
|
+
|
906
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.6.0...v1.6.1)
|
907
|
+
|
908
|
+
### Changed
|
410
909
|
* 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.
|
411
910
|
|
412
|
-
###
|
911
|
+
### Fixed
|
413
912
|
* Token cache files with invalid JSON syntax will no longer crash the bot at login.
|
414
913
|
|
415
|
-
## 1.6.0
|
914
|
+
## [1.6.0] - 2016-02-01
|
915
|
+
[1.6.0]: https://github.com/discordrb/discordrb/releases/tag/v1.6.0
|
916
|
+
|
917
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.4...v1.6.0)
|
416
918
|
|
417
|
-
|
919
|
+
### Added
|
920
|
+
* 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/).
|
418
921
|
* 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.
|
419
922
|
* The [new library comparison](https://discordapi.com/unofficial/comparison.html) is now fully supported, barring voice receive and multi-send: (#39)
|
420
923
|
* `bot.invite` will create an `Invite` object from a code containing information about it.
|
@@ -433,38 +936,62 @@ puts bot.profile.username
|
|
433
936
|
* To avoid confusion with `avatar_url`, the reader `user.avatar` was renamed to `avatar_id`. (`user.avatar` still exists but is now deprecated.)
|
434
937
|
* Symbols are now used instead of strings as hash keys in all methods that send JSON data to somewhere. This might improve performance slightly.
|
435
938
|
|
436
|
-
###
|
939
|
+
### Fixed
|
437
940
|
* Fixed the reader `server.afk_channel_id` not containing a value sometimes.
|
438
941
|
* 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.
|
439
942
|
* 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.
|
440
943
|
* The `inviter` of an `Invite` will now be `nil` instead of causing an exception when it doesn't exist in the invite data.
|
441
944
|
|
442
|
-
## 1.5.4
|
945
|
+
## [1.5.4] - 2016-01-16
|
946
|
+
[1.5.4]: https://github.com/discordrb/discordrb/releases/tag/v1.5.4
|
947
|
+
|
948
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.3...v1.5.4)
|
949
|
+
|
950
|
+
### Changed
|
443
951
|
* 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)
|
444
952
|
|
445
|
-
###
|
953
|
+
### Fixed
|
446
954
|
* Voice volume can now be properly set when using avconv (#37, thanks @purintai)
|
447
955
|
* `websocket-client-simple`, which is required for voice, is now specified in the dependencies.
|
448
956
|
|
449
|
-
## 1.5.3
|
957
|
+
## [1.5.3] - 2016-01-11
|
958
|
+
[1.5.3]: https://github.com/discordrb/discordrb/releases/tag/v1.5.3
|
959
|
+
|
960
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.2...v1.5.3)
|
961
|
+
|
962
|
+
### Added
|
450
963
|
* 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)
|
451
964
|
* 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)
|
452
965
|
|
453
|
-
## 1.5.2
|
966
|
+
## [1.5.2] - 2016-01-11
|
967
|
+
[1.5.2]: https://github.com/discordrb/discordrb/releases/tag/v1.5.2
|
968
|
+
|
969
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.1...v1.5.2)
|
970
|
+
|
971
|
+
### Added
|
454
972
|
* `bot.voice_connect` can now use a channel ID directly.
|
455
973
|
* A reader `bot.volume` now exists for the corresponding writer.
|
456
974
|
* The attribute `bot.encoder.use_avconv` was added that makes the bot use avconv instead of ffmpeg (for those on Ubuntu 14.x)
|
457
975
|
* The PBKDF2 iteration count for token caching was increased to 300,000 for extra security.
|
458
976
|
|
459
|
-
###
|
977
|
+
### Fixed
|
460
978
|
* Fix a bug where `play_file` wouldn't properly accept string file paths (#36, thanks @purintai)
|
461
979
|
* Fix a concurrency issue where `VoiceBot` would try to read from nil
|
462
980
|
|
981
|
+
## [1.5.1] - 2016-01-10
|
982
|
+
[1.5.1]: https://github.com/discordrb/discordrb/releases/tag/v1.5.1
|
463
983
|
|
464
|
-
|
984
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.5.0...v1.5.1)
|
985
|
+
|
986
|
+
### Added
|
465
987
|
* 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`.
|
466
988
|
|
467
|
-
## 1.5.0
|
989
|
+
## [1.5.0] - 2016-01-10
|
990
|
+
[1.5.0]: https://github.com/discordrb/discordrb/releases/tag/v1.5.0
|
991
|
+
|
992
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.8...v1.5.0)
|
993
|
+
|
994
|
+
### Added
|
468
995
|
* Voice support: discordrb can now connect to voice using `bot.voice_connect` and do the following things:
|
469
996
|
* Play files and URLs using `VoiceBot.play_file`
|
470
997
|
* Play arbitrary streams using `VoiceBot.play_io`
|
@@ -472,63 +999,99 @@ puts bot.profile.username
|
|
472
999
|
* Pause and resume playback (`VoiceBot.pause` and `VoiceBot.continue`)
|
473
1000
|
* 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.
|
474
1001
|
|
475
|
-
###
|
1002
|
+
### Fixed
|
476
1003
|
* Some latent ID casting errors were fixed - those would probably never have been noticed anyway, but they're fixed now.
|
477
1004
|
* `Bot.parse_mention` now works, it didn't work at all previously
|
478
1005
|
|
479
|
-
## 1.4.8
|
1006
|
+
## [1.4.8] - 2016-01-06
|
1007
|
+
[1.4.8]: https://github.com/discordrb/discordrb/releases/tag/v1.4.8
|
1008
|
+
|
1009
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.7...v1.4.8)
|
1010
|
+
|
1011
|
+
### Added
|
480
1012
|
* The `User` class now has the methods `add_role` and `remove_role` which add a role to a user and remove it, respectively.
|
481
1013
|
* All data classes now have a useful `==` implementation.
|
482
1014
|
* **The `Game` class and all references to it were removed**. Games are now only identified by their name.
|
483
1015
|
|
484
|
-
###
|
1016
|
+
### Fixed
|
485
1017
|
* When a role is deleted, the ID is now obtained correctly. (#30)
|
486
1018
|
|
487
|
-
## 1.4.7
|
1019
|
+
## [1.4.7] - 2016-01-03
|
1020
|
+
[1.4.7]: https://github.com/discordrb/discordrb/releases/tag/v1.4.7
|
1021
|
+
|
1022
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.6...v1.4.7)
|
1023
|
+
|
1024
|
+
### Added
|
488
1025
|
* Presence event handling is now divided into two separate events; `PresenceEvent` to handle online/offline/idle statuses and `PlayingEvent` to handle users playing games.
|
489
1026
|
* 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.
|
490
1027
|
* `Message` now has a useful `to_s` method that just returns the content.
|
491
1028
|
|
492
|
-
###
|
1029
|
+
### Fixed
|
493
1030
|
* The `TypingEvent` `user` property is now initialized correctly (#29, thanks @purintai)
|
494
1031
|
|
495
|
-
## 1.4.6
|
496
|
-
|
1032
|
+
## [1.4.6] - 2015-12-25
|
1033
|
+
[1.4.6]: https://github.com/discordrb/discordrb/releases/tag/v1.4.6
|
497
1034
|
|
498
|
-
|
1035
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.4...v1.4.6)
|
1036
|
+
|
1037
|
+
### Fixed
|
499
1038
|
* The `user` and `server` properties of `PresenceEvent` are now initialized correctly.
|
500
1039
|
|
501
1040
|
## 1.4.5
|
1041
|
+
<!-- This was never tagged in the git repo -->
|
1042
|
+
### Changed
|
502
1043
|
* The `Bot.game` property can now be set to an arbitrary string.
|
503
1044
|
* Discord mentions are handled in the old way again, after Discord reverted an API change.
|
504
1045
|
|
505
|
-
## 1.4.4
|
1046
|
+
## [1.4.4] - 2015-12-18
|
1047
|
+
[1.4.4]: https://github.com/discordrb/discordrb/releases/tag/v1.4.4
|
1048
|
+
|
1049
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.3...v1.4.4)
|
1050
|
+
|
1051
|
+
### Added
|
506
1052
|
* Add `Server.leave_server` as an alias for `delete_server`
|
507
1053
|
* Use the new Discord mention format (mentions array). **Reverted in 1.4.5**
|
508
1054
|
* Discord rate limited API calls are now handled correctly - discordrb will try again after the specified time.
|
509
1055
|
* Debug logging is now handled by a separate `Logger` class
|
510
1056
|
|
511
|
-
###
|
1057
|
+
### Fixed
|
512
1058
|
* Message timestamps are now parsed correctly.
|
513
1059
|
* The quickadders for awaits (`User.await`, `Channel.await` etc.) now add the correct awaits.
|
514
1060
|
|
515
|
-
## 1.4.3
|
1061
|
+
## [1.4.3] - 2015-12-11
|
1062
|
+
[1.4.3]: https://github.com/discordrb/discordrb/releases/tag/v1.4.3
|
1063
|
+
|
1064
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.2...v1.4.3)
|
1065
|
+
|
1066
|
+
### Added
|
516
1067
|
* Added a method `Bot.find_user` analogous to `Bot.find`.
|
517
1068
|
|
518
|
-
###
|
1069
|
+
### Fixed
|
519
1070
|
* Remove a leftover debug line (#23, thanks @VxJasonxV)
|
520
1071
|
|
521
|
-
## 1.4.2
|
1072
|
+
## [1.4.2] - 2015-12-10
|
1073
|
+
[1.4.2]: https://github.com/discordrb/discordrb/releases/tag/v1.4.2
|
1074
|
+
|
1075
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.1...v1.4.2)
|
1076
|
+
|
1077
|
+
### Changed
|
522
1078
|
* discordrb will now send a user agent in the format requested by the Discord devs.
|
523
1079
|
|
524
|
-
## 1.4.1
|
525
|
-
|
1080
|
+
## [1.4.1] - 2015-12-07
|
1081
|
+
[1.4.1]: https://github.com/discordrb/discordrb/releases/tag/v1.4.1
|
1082
|
+
|
1083
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.4.0...v1.4.1)
|
526
1084
|
|
527
|
-
###
|
1085
|
+
### Fixed
|
528
1086
|
* Empty messages will now never be sent
|
529
1087
|
* The command-not-found message in `CommandBot` can now be disabled properly
|
530
1088
|
|
531
|
-
## 1.4.0
|
1089
|
+
## [1.4.0] - 2015-12-04
|
1090
|
+
[1.4.0]: https://github.com/discordrb/discordrb/releases/tag/v1.4.0
|
1091
|
+
|
1092
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.12...v1.4.0)
|
1093
|
+
|
1094
|
+
### Added
|
532
1095
|
* 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).
|
533
1096
|
* discordrb now supports everything on the Discord API comparison, except for voice (see also #22)
|
534
1097
|
* Roles can now be created, edited and deleted and their permissions modified.
|
@@ -542,58 +1105,95 @@ puts bot.profile.username
|
|
542
1105
|
* discordrb now handles created/updated/deleted servers properly with events added to handle them.
|
543
1106
|
* The list of games handled by Discord will now be updated automatically.
|
544
1107
|
|
545
|
-
###
|
1108
|
+
### Fixed
|
546
1109
|
* Fixed a bug where command handling would crash if the command didn't exist.
|
547
1110
|
|
548
|
-
## 1.3.12
|
1111
|
+
## [1.3.12] - 2015-11-30
|
1112
|
+
[1.3.12]: https://github.com/discordrb/discordrb/releases/tag/v1.3.12
|
1113
|
+
|
1114
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.11...v1.3.12)
|
1115
|
+
|
1116
|
+
### Added
|
549
1117
|
* 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.
|
550
1118
|
* `User.bot?` and `Message.from_bot?` were implemented to check whether the user is the bot or the message was sent by it.
|
551
1119
|
* Add an event for private messages specifically (`Bot.pm` and `PrivateMessageEvent`)
|
552
1120
|
|
553
|
-
###
|
1121
|
+
### Fixed
|
554
1122
|
* Fix the `MessageEvent` attribute that checks whether the message is from the bot not working at all.
|
555
1123
|
|
556
|
-
## 1.3.11
|
1124
|
+
## [1.3.11] - 2015-11-29
|
1125
|
+
[1.3.11]: https://github.com/discordrb/discordrb/releases/tag/v1.3.11
|
1126
|
+
|
1127
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.10...v1.3.11)
|
1128
|
+
|
1129
|
+
### Added
|
557
1130
|
* Add a user selector (`:bot`) that is usable in the `from:` `MessageEvent` attribute to check whether the message was sent by a bot.
|
558
1131
|
|
559
|
-
###
|
1132
|
+
### Fixed
|
560
1133
|
* `Channel.private?` now checks for the server being nil instead of the `is_private` attribute provided by Discord as the latter is unreliable. (wtf)
|
561
1134
|
|
562
|
-
## 1.3.10
|
1135
|
+
## [1.3.10] - 2015-11-28
|
1136
|
+
[1.3.10]: https://github.com/discordrb/discordrb/releases/tag/v1.3.10
|
1137
|
+
|
1138
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.9...v1.3.10)
|
1139
|
+
|
1140
|
+
### Added
|
563
1141
|
* Add a method `Channel.private?` to check for a PM channel
|
564
1142
|
* Add a `MessageEvent` attribute (`:private`) to check whether a message was sent in a PM channel
|
565
1143
|
* Add various aliases to `MessageEvent` attributes
|
566
1144
|
* Allow regexes to check for strings in `MessageEvent` attributes
|
567
1145
|
|
568
|
-
###
|
1146
|
+
### Fixed
|
569
1147
|
* 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
|
570
1148
|
|
571
|
-
## 1.3.9
|
1149
|
+
## [1.3.9] - 2015-11-27
|
1150
|
+
[1.3.9]: https://github.com/discordrb/discordrb/releases/tag/v1.3.9
|
1151
|
+
|
1152
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.8...v1.3.9)
|
1153
|
+
|
1154
|
+
### Added
|
572
1155
|
* Add awaits, a powerful way to add temporary event handlers.
|
573
1156
|
* Add a `Bot.find` method to fuzzy-search for channels.
|
574
1157
|
* Add methods to kick, ban and unban users.
|
575
1158
|
|
576
|
-
###
|
1159
|
+
### Fixed
|
577
1160
|
* Permission overrides now work correctly for private channels (i. e. they don't exist at all)
|
578
1161
|
* Users joining and leaving servers are now handled correctly.
|
579
1162
|
|
580
|
-
## 1.3.8
|
1163
|
+
## [1.3.8] - 2015-11-12
|
1164
|
+
[1.3.8]: https://github.com/discordrb/discordrb/releases/tag/v1.3.8
|
1165
|
+
|
1166
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.7...v1.3.8)
|
1167
|
+
|
1168
|
+
### Added
|
581
1169
|
* Added `Bot.users` and `Bot.servers` readers to get the list of users and servers.
|
582
1170
|
|
583
|
-
###
|
1171
|
+
### Fixed
|
584
1172
|
* 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)
|
585
1173
|
|
586
|
-
## 1.3.7
|
587
|
-
|
1174
|
+
## [1.3.7] - 2015-11-07
|
1175
|
+
[1.3.7]: https://github.com/discordrb/discordrb/releases/tag/v1.3.7
|
588
1176
|
|
589
|
-
|
1177
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.6...v1.3.7)
|
1178
|
+
|
1179
|
+
### Fixed
|
590
1180
|
* Fix the command bot being included wrong, which caused crashes upon startup.
|
591
1181
|
|
592
|
-
## 1.3.6
|
1182
|
+
## [1.3.6] - 2015-11-07
|
1183
|
+
[1.3.6]: https://github.com/discordrb/discordrb/releases/tag/v1.3.6
|
1184
|
+
|
1185
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.5...v1.3.6)
|
1186
|
+
|
1187
|
+
### Added
|
593
1188
|
* The bot can now be stopped from the script using the new method `Bot.stop`.
|
594
1189
|
|
595
|
-
###
|
1190
|
+
### Fixed
|
596
1191
|
* Fix some wrong file requires which caused crashes sometimes.
|
597
1192
|
|
598
|
-
## 1.3.5
|
1193
|
+
## [1.3.5] - 2015-11-07
|
1194
|
+
[1.3.5]: https://github.com/discordrb/discordrb/releases/tag/v1.3.5
|
1195
|
+
|
1196
|
+
[View diff for this release.](https://github.com/discordrb/discordrb/compare/v1.3.4...v1.3.5)
|
1197
|
+
|
1198
|
+
### Added
|
599
1199
|
* The bot can now be run asynchronously using `Bot.run(:async)` to do further initialization after the bot was started.
|