discordrb 3.4.3 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +44 -18
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -1
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -1
- data/.github/workflows/codeql.yml +65 -0
- data/.markdownlint.json +4 -0
- data/.rubocop.yml +8 -2
- data/CHANGELOG.md +390 -225
- data/LICENSE.txt +1 -1
- data/README.md +37 -25
- data/discordrb-webhooks.gemspec +4 -1
- data/discordrb.gemspec +9 -6
- data/lib/discordrb/api/application.rb +202 -0
- data/lib/discordrb/api/channel.rb +177 -11
- data/lib/discordrb/api/interaction.rb +54 -0
- data/lib/discordrb/api/invite.rb +2 -2
- data/lib/discordrb/api/server.rb +40 -19
- data/lib/discordrb/api/user.rb +8 -3
- data/lib/discordrb/api/webhook.rb +57 -0
- data/lib/discordrb/api.rb +19 -5
- data/lib/discordrb/bot.rb +317 -32
- data/lib/discordrb/cache.rb +27 -22
- data/lib/discordrb/commands/command_bot.rb +6 -4
- data/lib/discordrb/commands/container.rb +1 -1
- data/lib/discordrb/commands/parser.rb +2 -2
- data/lib/discordrb/commands/rate_limiter.rb +1 -1
- data/lib/discordrb/container.rb +132 -3
- data/lib/discordrb/data/attachment.rb +15 -0
- data/lib/discordrb/data/audit_logs.rb +3 -3
- data/lib/discordrb/data/channel.rb +167 -23
- data/lib/discordrb/data/component.rb +229 -0
- data/lib/discordrb/data/integration.rb +42 -3
- data/lib/discordrb/data/interaction.rb +800 -0
- data/lib/discordrb/data/invite.rb +1 -1
- data/lib/discordrb/data/member.rb +108 -33
- data/lib/discordrb/data/message.rb +99 -19
- data/lib/discordrb/data/overwrite.rb +13 -7
- data/lib/discordrb/data/role.rb +58 -1
- data/lib/discordrb/data/server.rb +82 -80
- data/lib/discordrb/data/user.rb +69 -9
- data/lib/discordrb/data/webhook.rb +97 -4
- data/lib/discordrb/data.rb +3 -0
- data/lib/discordrb/errors.rb +44 -3
- data/lib/discordrb/events/channels.rb +1 -1
- data/lib/discordrb/events/interactions.rb +482 -0
- data/lib/discordrb/events/message.rb +9 -6
- data/lib/discordrb/events/presence.rb +21 -14
- data/lib/discordrb/events/reactions.rb +0 -1
- data/lib/discordrb/events/threads.rb +96 -0
- data/lib/discordrb/gateway.rb +30 -17
- data/lib/discordrb/permissions.rb +59 -34
- data/lib/discordrb/version.rb +1 -1
- data/lib/discordrb/voice/encoder.rb +2 -2
- data/lib/discordrb/voice/network.rb +18 -7
- data/lib/discordrb/voice/sodium.rb +3 -1
- data/lib/discordrb/voice/voice_bot.rb +3 -3
- data/lib/discordrb/webhooks.rb +2 -0
- data/lib/discordrb.rb +37 -4
- metadata +48 -14
- data/.codeclimate.yml +0 -16
- data/.travis.yml +0 -32
- data/bin/travis_build_docs.sh +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 256d58c280ec27b90dbe4c160b04853b72fede9123336085343141e4d0e6ad4a
|
4
|
+
data.tar.gz: 8f4db65b7491433052cc99b1a0e633fc773efd8076edbd4ad44a5bc3ed4b5a14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed49c17ab20befc243747a942d4401b513670220d76632b796df000e9232bebd5d6f58c6ce7a1bb5a16f03d8d88ec1b2c5c6131e1ddd20784cf4b7248111a979
|
7
|
+
data.tar.gz: 01fb50074b67c0bcb3c96ed2cc4e76aad57600e94fa22793c588e66c98fddd796f7a7087817b9d7926975e28e956d950ce7fd1d778e73edf26c32be49dabbedb
|
data/.circleci/config.yml
CHANGED
@@ -27,45 +27,50 @@ commands:
|
|
27
27
|
- ./vendor/bundle
|
28
28
|
|
29
29
|
jobs:
|
30
|
-
|
30
|
+
test_ruby_27:
|
31
31
|
docker:
|
32
|
-
- image: ruby:2.
|
32
|
+
- image: ruby:2.7-alpine
|
33
33
|
steps:
|
34
34
|
- setup-env
|
35
35
|
- run:
|
36
36
|
name: Run RSpec
|
37
|
-
command: bundle exec rspec
|
37
|
+
command: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/rspec/rspec.xml
|
38
|
+
- store_test_results:
|
39
|
+
path: ~/rspec
|
38
40
|
|
39
|
-
|
41
|
+
test_ruby_30:
|
40
42
|
docker:
|
41
|
-
- image: ruby:
|
43
|
+
- image: ruby:3.0-alpine
|
42
44
|
steps:
|
43
45
|
- setup-env
|
44
46
|
- run:
|
45
47
|
name: Run RSpec
|
46
|
-
command: bundle exec rspec
|
48
|
+
command: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/rspec/rspec.xml
|
49
|
+
- store_test_results:
|
50
|
+
path: ~/rspec
|
47
51
|
|
48
|
-
|
52
|
+
|
53
|
+
test_ruby_31:
|
49
54
|
docker:
|
50
|
-
- image: ruby:
|
55
|
+
- image: ruby:3.1-alpine
|
51
56
|
steps:
|
52
57
|
- setup-env
|
53
58
|
- run:
|
54
59
|
name: Run RSpec
|
55
|
-
command: bundle exec rspec
|
60
|
+
command: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/rspec/rspec.xml
|
56
61
|
|
57
62
|
rubocop:
|
58
63
|
docker:
|
59
|
-
- image: ruby:2.
|
64
|
+
- image: ruby:2.7-alpine
|
60
65
|
steps:
|
61
66
|
- setup-env
|
62
67
|
- run:
|
63
68
|
name: Run Rubocop
|
64
|
-
command: bundle exec rubocop
|
69
|
+
command: bundle exec rubocop
|
65
70
|
|
66
71
|
yard:
|
67
72
|
docker:
|
68
|
-
- image: ruby:2.
|
73
|
+
- image: ruby:2.7-alpine
|
69
74
|
steps:
|
70
75
|
- setup-env
|
71
76
|
- attach_workspace:
|
@@ -79,13 +84,22 @@ jobs:
|
|
79
84
|
- docs
|
80
85
|
|
81
86
|
pages:
|
82
|
-
|
87
|
+
docker:
|
88
|
+
- image: alpine
|
83
89
|
steps:
|
90
|
+
- run:
|
91
|
+
name: Install OS packages
|
92
|
+
command: apk add git openssh-client-default
|
84
93
|
- attach_workspace:
|
85
94
|
at: /tmp/workspace
|
86
95
|
- run:
|
87
96
|
name: Clone docs
|
88
|
-
command:
|
97
|
+
command: |
|
98
|
+
mkdir -p ~/.ssh
|
99
|
+
|
100
|
+
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
|
101
|
+
|
102
|
+
git clone $CIRCLE_REPOSITORY_URL -b gh-pages .
|
89
103
|
- add_ssh_keys:
|
90
104
|
fingerprints:
|
91
105
|
- "9a:4c:50:94:23:46:81:74:41:97:87:04:4e:59:4b:4e"
|
@@ -111,16 +125,28 @@ jobs:
|
|
111
125
|
workflows:
|
112
126
|
test:
|
113
127
|
jobs:
|
114
|
-
- test_ruby_25
|
115
|
-
- test_ruby_26
|
116
128
|
- test_ruby_27
|
129
|
+
- test_ruby_30
|
130
|
+
- test_ruby_31
|
117
131
|
- rubocop
|
118
132
|
- yard
|
119
133
|
deploy:
|
120
134
|
jobs:
|
121
135
|
- yard:
|
122
|
-
filters:
|
136
|
+
filters:
|
137
|
+
branches:
|
138
|
+
only:
|
139
|
+
- main
|
140
|
+
- slash_commands
|
141
|
+
tags:
|
142
|
+
only: /^v.*/
|
123
143
|
- pages:
|
124
144
|
requires:
|
125
145
|
- yard
|
126
|
-
filters:
|
146
|
+
filters:
|
147
|
+
branches:
|
148
|
+
only:
|
149
|
+
- main
|
150
|
+
- slash_commands
|
151
|
+
tags:
|
152
|
+
only: /^v.*/
|
@@ -0,0 +1,65 @@
|
|
1
|
+
name: "CodeQL"
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ 'main' ]
|
6
|
+
pull_request:
|
7
|
+
# The branches below must be a subset of the branches above
|
8
|
+
branches: [ 'main' ]
|
9
|
+
schedule:
|
10
|
+
- cron: '29 6 * * 5'
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
analyze:
|
14
|
+
name: Analyze
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
permissions:
|
17
|
+
actions: read
|
18
|
+
contents: read
|
19
|
+
security-events: write
|
20
|
+
|
21
|
+
strategy:
|
22
|
+
fail-fast: false
|
23
|
+
matrix:
|
24
|
+
language: [ 'ruby' ]
|
25
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
26
|
+
# Use only 'java' to analyze code written in Java, Kotlin or both
|
27
|
+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
28
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
29
|
+
|
30
|
+
steps:
|
31
|
+
- name: Checkout repository
|
32
|
+
uses: actions/checkout@v3
|
33
|
+
|
34
|
+
# Initializes the CodeQL tools for scanning.
|
35
|
+
- name: Initialize CodeQL
|
36
|
+
uses: github/codeql-action/init@v2
|
37
|
+
with:
|
38
|
+
languages: ${{ matrix.language }}
|
39
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
40
|
+
# By default, queries listed here will override any specified in a config file.
|
41
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
42
|
+
|
43
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
44
|
+
# queries: security-extended,security-and-quality
|
45
|
+
|
46
|
+
|
47
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
48
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
49
|
+
- name: Autobuild
|
50
|
+
uses: github/codeql-action/autobuild@v2
|
51
|
+
|
52
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
53
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
54
|
+
|
55
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
56
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
57
|
+
|
58
|
+
# - run: |
|
59
|
+
# echo "Run, Build Application using script"
|
60
|
+
# ./location_of_script_within_repo/buildscript.sh
|
61
|
+
|
62
|
+
- name: Perform CodeQL Analysis
|
63
|
+
uses: github/codeql-action/analyze@v2
|
64
|
+
with:
|
65
|
+
category: "/language:${{matrix.language}}"
|
data/.markdownlint.json
ADDED
data/.rubocop.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
require:
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rake
|
2
4
|
|
3
5
|
inherit_mode:
|
4
6
|
merge:
|
@@ -6,7 +8,7 @@ inherit_mode:
|
|
6
8
|
|
7
9
|
AllCops:
|
8
10
|
NewCops: enable
|
9
|
-
TargetRubyVersion: 2.
|
11
|
+
TargetRubyVersion: 2.7
|
10
12
|
|
11
13
|
# Disable line length checks
|
12
14
|
Layout/LineLength:
|
@@ -38,6 +40,10 @@ Security/Eval:
|
|
38
40
|
Style/Alias:
|
39
41
|
Enabled: false
|
40
42
|
|
43
|
+
# Had to disable this globally because it's being silently autocorrected even with local disable comments?
|
44
|
+
Style/BisectedAttrAccessor:
|
45
|
+
Enabled: false
|
46
|
+
|
41
47
|
# Prefer compact module/class defs
|
42
48
|
Style/ClassAndModuleChildren:
|
43
49
|
Enabled: false
|