lib_discord 0.1.0.pre2 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +129 -0
- data/CODE_OF_CONDUCT.md +134 -0
- data/LICENSES/AGPL-3.0-only.txt +661 -0
- data/README.md +122 -0
- data/lib/lib_discord/application.rb +43 -0
- data/lib/lib_discord/application_command.rb +341 -0
- data/lib/lib_discord/application_role_connection_metadata.rb +52 -0
- data/lib/lib_discord/audit_log.rb +36 -0
- data/lib/lib_discord/auto_moderation.rb +106 -0
- data/lib/lib_discord/channel.rb +716 -0
- data/lib/lib_discord/client.rb +124 -14
- data/lib/lib_discord/emoji.rb +106 -0
- data/lib/lib_discord/errors.rb +24 -0
- data/lib/lib_discord/guild.rb +830 -0
- data/lib/lib_discord/guild_scheduled_event.rb +133 -0
- data/lib/lib_discord/guild_template.rb +128 -0
- data/lib/lib_discord/interaction.rb +163 -0
- data/lib/lib_discord/invite.rb +47 -0
- data/lib/lib_discord/mappers/application_command_option_types.rb +22 -0
- data/lib/lib_discord/mappers/application_command_permission_types.rb +14 -0
- data/lib/lib_discord/mappers/application_command_types.rb +14 -0
- data/lib/lib_discord/mappers/application_integration_types.rb +13 -0
- data/lib/lib_discord/mappers/application_role_connection_metadata_types.rb +19 -0
- data/lib/lib_discord/mappers/audit_log_events.rb +67 -0
- data/lib/lib_discord/mappers/auto_moderation_action_types.rb +14 -0
- data/lib/lib_discord/mappers/auto_moderation_event_types.rb +12 -0
- data/lib/lib_discord/mappers/auto_moderation_keyword_preset_types.rb +14 -0
- data/lib/lib_discord/mappers/auto_moderation_trigger_types.rb +15 -0
- data/lib/lib_discord/mappers/channel_forum_layout_types.rb +14 -0
- data/lib/lib_discord/mappers/channel_message_activity_types.rb +15 -0
- data/lib/lib_discord/mappers/channel_message_types.rb +42 -0
- data/lib/lib_discord/mappers/channel_sort_order_types.rb +13 -0
- data/lib/lib_discord/mappers/channel_types.rb +24 -0
- data/lib/lib_discord/mappers/channel_video_quality_modes.rb +13 -0
- data/lib/lib_discord/mappers/guild_default_message_notification_levels.rb +13 -0
- data/lib/lib_discord/mappers/guild_explicit_content_filter_levels.rb +14 -0
- data/lib/lib_discord/mappers/guild_integration_expire_behaviors.rb +13 -0
- data/lib/lib_discord/mappers/guild_mfa_levels.rb +13 -0
- data/lib/lib_discord/mappers/guild_nsfw_levels.rb +15 -0
- data/lib/lib_discord/mappers/guild_onboarding_modes.rb +13 -0
- data/lib/lib_discord/mappers/guild_premium_tiers.rb +15 -0
- data/lib/lib_discord/mappers/guild_prompt_types.rb +13 -0
- data/lib/lib_discord/mappers/guild_scheduled_event_entity_types.rb +14 -0
- data/lib/lib_discord/mappers/guild_scheduled_event_privacy_levels.rb +12 -0
- data/lib/lib_discord/mappers/guild_scheduled_event_statuses.rb +15 -0
- data/lib/lib_discord/mappers/guild_verification_levels.rb +16 -0
- data/lib/lib_discord/mappers/interaction_callback_types.rb +19 -0
- data/lib/lib_discord/mappers/interaction_context_types.rb +14 -0
- data/lib/lib_discord/mappers/interaction_types.rb +16 -0
- data/lib/lib_discord/mappers/invite_target_types.rb +13 -0
- data/lib/lib_discord/mappers/message_component_button_styles.rb +16 -0
- data/lib/lib_discord/mappers/message_component_text_input_styles.rb +13 -0
- data/lib/lib_discord/mappers/message_component_types.rb +19 -0
- data/lib/lib_discord/mappers/poll_layout_types.rb +12 -0
- data/lib/lib_discord/mappers/stage_instance_privacy_levels.rb +13 -0
- data/lib/lib_discord/mappers/sticker_format_types.rb +15 -0
- data/lib/lib_discord/mappers/sticker_types.rb +13 -0
- data/lib/lib_discord/mappers/user_premium_types.rb +15 -0
- data/lib/lib_discord/mappers/user_visibility_types.rb +13 -0
- data/lib/lib_discord/mappers/webhooks_types.rb +14 -0
- data/lib/lib_discord/mappers.rb +87 -0
- data/lib/lib_discord/poll.rb +62 -0
- data/lib/lib_discord/resource.rb +91 -21
- data/lib/lib_discord/response.rb +39 -7
- data/lib/lib_discord/stage_instance.rb +79 -0
- data/lib/lib_discord/sticker.rb +132 -0
- data/lib/lib_discord/types.rb +35 -11
- data/lib/lib_discord/urls.rb +20 -12
- data/lib/lib_discord/user.rb +174 -0
- data/lib/lib_discord/version.rb +5 -1
- data/lib/lib_discord/voice.rb +29 -0
- data/lib/lib_discord/webhook.rb +299 -0
- data/lib/lib_discord.rb +5 -0
- metadata +81 -20
- data/lib/lib_discord/resources/application.rb +0 -15
- data/lib/lib_discord/resources/application_command.rb +0 -71
- data/lib/lib_discord/resources/application_role_connection_metadata.rb +0 -15
- data/lib/lib_discord/resources/audit_log.rb +0 -11
- data/lib/lib_discord/resources/auto_moderation.rb +0 -27
- data/lib/lib_discord/resources/channel.rb +0 -168
- data/lib/lib_discord/resources/emoji.rb +0 -27
- data/lib/lib_discord/resources/guild.rb +0 -196
- data/lib/lib_discord/resources/guild_scheduled_event.rb +0 -31
- data/lib/lib_discord/resources/guild_template.rb +0 -35
- data/lib/lib_discord/resources/interaction.rb +0 -39
- data/lib/lib_discord/resources/invite.rb +0 -15
- data/lib/lib_discord/resources/stage_instance.rb +0 -23
- data/lib/lib_discord/resources/sticker.rb +0 -35
- data/lib/lib_discord/resources/user.rb +0 -51
- data/lib/lib_discord/resources/voice.rb +0 -11
- data/lib/lib_discord/resources/webhook.rb +0 -67
- data/lib/lib_discord/resources.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9cf44b776374fa1b6a60da79128df73f65b0ae8a5aa29902e1dbc7a2b276fa0
|
4
|
+
data.tar.gz: a145257108e443b6daba18fef081d49f872dd6b0cb8be2c8864c13890bdeb85a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 913619b768f0414b963736e3ca1238e88f637ced1fd9bdf7361557e6caae487e81d62deacff0250e7bfb6a953a33b80b380add38eb9a5c93df11814f4a91ee25
|
7
|
+
data.tar.gz: 448a47d8b9b033bb395a62ec22cbcf4059fe47538ba8fd8d7c96f969b01eaf25cd76bda4a36fa0f500282f76f6e66b8b69ae3cfdeafb637ac647bf349feb35ff
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## [0.1.1] - 2024-04-24
|
4
|
+
|
5
|
+
### chore
|
6
|
+
- Revert "fix: remove gem version badge"
|
7
|
+
- include additional files for yardoc
|
8
|
+
- bump version to 0.1.1
|
9
|
+
|
10
|
+
### fix
|
11
|
+
- remove gem version badge
|
12
|
+
- name dry-container keys correctly
|
13
|
+
|
14
|
+
## [0.1.0] - 2024-04-24
|
15
|
+
|
16
|
+
### chore
|
17
|
+
- generate CHANGELOG.md
|
18
|
+
- typo fix
|
19
|
+
- use `standard` gem rather than `standardrb` alias
|
20
|
+
- shields always make a project cooler
|
21
|
+
- move resources into the lib_discord dir
|
22
|
+
- add yardoc for application
|
23
|
+
- yardoc for application_command
|
24
|
+
- yardoc for application_role_connection_metadata
|
25
|
+
- yardoc for audit_log
|
26
|
+
- yardoc for auto_moderation
|
27
|
+
- yardoc for channel
|
28
|
+
- yardoc for emoji
|
29
|
+
- yardoc for guild
|
30
|
+
- yardoc for guild_scheduled_event and guild_template
|
31
|
+
- yardoc for stage_instance
|
32
|
+
- yardoc for sticker
|
33
|
+
- yardoc for user
|
34
|
+
- yardoc for voice
|
35
|
+
- yardoc for webhook
|
36
|
+
- finish yardoc
|
37
|
+
- add changelog to generated yardoc
|
38
|
+
- note all the parameters that are discord snowflakes
|
39
|
+
- reduce line length to 80 columns, where it makes sense
|
40
|
+
- application-commands - copy descriptions
|
41
|
+
- application - copy descriptions
|
42
|
+
- interactions - copy descriptions
|
43
|
+
- application-role-connection-metadata - copy descriptions
|
44
|
+
- let's leave the endpoint descriptions to Discord
|
45
|
+
- use our binstubs
|
46
|
+
- document the mappers module
|
47
|
+
|
48
|
+
### feat
|
49
|
+
- polls came out since i started working on this library!
|
50
|
+
- [**breaking**] authorization header for client is now a positional argument
|
51
|
+
- account for endpoints that don't require auth
|
52
|
+
- add convenience constants for discord integer encodings
|
53
|
+
- bump to version 0.1.0
|
54
|
+
|
55
|
+
### fix
|
56
|
+
- bad yardoc
|
57
|
+
- incorrect ruby-object `#inspect` output in documentation
|
58
|
+
|
59
|
+
## [0.1.0.pre2] - 2024-04-15
|
60
|
+
|
61
|
+
### chore
|
62
|
+
- generate CHANGELOG.md
|
63
|
+
- bump version to 0.1.0.pre2
|
64
|
+
|
65
|
+
### fix
|
66
|
+
- let's not leak Discord Bot Tokens to stdout
|
67
|
+
|
68
|
+
## [0.1.0.pre] - 2024-04-15
|
69
|
+
|
70
|
+
### chore
|
71
|
+
- initial rspec scaffold
|
72
|
+
- move shared_examples into a single file
|
73
|
+
- add code coverage reporting
|
74
|
+
- mark development dependencies as such
|
75
|
+
- don't test HTTP if we don't need to
|
76
|
+
- make sure we can do non-200 responses
|
77
|
+
- yard and debug version contraints
|
78
|
+
- add standardrb tooling
|
79
|
+
- add sourcehut build manifest
|
80
|
+
- add coverage reports to builds.sr.ht artifact list
|
81
|
+
- remove unused fixture tooling
|
82
|
+
|
83
|
+
### feat
|
84
|
+
- finish guild
|
85
|
+
- add guild_scheduled_event
|
86
|
+
- empty files for the rest of the resources
|
87
|
+
- add invites
|
88
|
+
- add stage instance endpoints
|
89
|
+
- add sticker endpoints
|
90
|
+
- add user endpoints
|
91
|
+
- add voice endpoints
|
92
|
+
- add webhook endpoints
|
93
|
+
- more rspec scaffolding
|
94
|
+
- basic tests for application resource
|
95
|
+
- add application_role_connection_metadata_spec
|
96
|
+
- add audit_log_spec
|
97
|
+
- add auto_moderation_spec
|
98
|
+
- more test scaffolding
|
99
|
+
- finished channel_spec
|
100
|
+
- fill out emoji_spec
|
101
|
+
- fill out guild_scheduled_event_spec
|
102
|
+
- fill out guild_spec and guild_template_spec
|
103
|
+
- fill out invite_spec and stage_instance_spec
|
104
|
+
- fill out sticker_spec
|
105
|
+
- fill out user_spec and voice_spec
|
106
|
+
- fill out webhook_spec
|
107
|
+
- make sure the client can access all resources
|
108
|
+
- add fixture support
|
109
|
+
- expose the container via delegators
|
110
|
+
- implement `#send_request` for Resource
|
111
|
+
- discord requests that we provide a user-agent
|
112
|
+
- introduce type checking for our inputs
|
113
|
+
- include query parameters for endpoints
|
114
|
+
- add interaction resource and interaction_spec
|
115
|
+
- add application_command and application_command_spec
|
116
|
+
- use custom matcher for lib_discord/response struct
|
117
|
+
- add a logger into the system
|
118
|
+
- test resource logging when mime-type is unknown
|
119
|
+
- update readme and ancillary documents
|
120
|
+
- add git-cliff for changelog generation
|
121
|
+
|
122
|
+
### fix
|
123
|
+
- i missed a bunch of guild endpoints
|
124
|
+
- ensure we're testing all the code
|
125
|
+
- contain the abstraction if HTTP throws an error
|
126
|
+
|
127
|
+
---
|
128
|
+
|
129
|
+
generated by [git-cliff](https://git-cliff.org/)
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
10
|
+
identity and orientation.
|
11
|
+
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
14
|
+
|
15
|
+
## Our Standards
|
16
|
+
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
19
|
+
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
26
|
+
community
|
27
|
+
|
28
|
+
Examples of unacceptable behavior include:
|
29
|
+
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances
|
31
|
+
of any kind
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
33
|
+
- Public or private harassment
|
34
|
+
- Publishing others' private information, such as a physical or email address,
|
35
|
+
without their explicit permission
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
38
|
+
|
39
|
+
## Enforcement Responsibilities
|
40
|
+
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
45
|
+
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for
|
49
|
+
moderation decisions when appropriate.
|
50
|
+
|
51
|
+
## Scope
|
52
|
+
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official email address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement. Please send any
|
63
|
+
reports via [plaintext email] to `~komidore64/write-only@lists.sr.ht`. All
|
64
|
+
complaints will be reviewed and investigated promptly and fairly.
|
65
|
+
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
68
|
+
|
69
|
+
[plaintext email]: https://useplaintext.email/
|
70
|
+
|
71
|
+
## Enforcement Guidelines
|
72
|
+
|
73
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
74
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
75
|
+
|
76
|
+
### 1. Correction
|
77
|
+
|
78
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
79
|
+
unprofessional or unwelcome in the community.
|
80
|
+
|
81
|
+
**Consequence**: A private, written warning from community leaders, providing
|
82
|
+
clarity around the nature of the violation and an explanation of why the
|
83
|
+
behavior was inappropriate. A public apology may be requested.
|
84
|
+
|
85
|
+
### 2. Warning
|
86
|
+
|
87
|
+
**Community Impact**: A violation through a single incident or series of
|
88
|
+
actions.
|
89
|
+
|
90
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
91
|
+
interaction with the people involved, including unsolicited interaction with
|
92
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
93
|
+
includes avoiding interactions in community spaces as well as external channels
|
94
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
95
|
+
ban.
|
96
|
+
|
97
|
+
### 3. Temporary Ban
|
98
|
+
|
99
|
+
**Community Impact**: A serious violation of community standards, including
|
100
|
+
sustained inappropriate behavior.
|
101
|
+
|
102
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
103
|
+
communication with the community for a specified period of time. No public or
|
104
|
+
private interaction with the people involved, including unsolicited interaction
|
105
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
106
|
+
Violating these terms may lead to a permanent ban.
|
107
|
+
|
108
|
+
### 4. Permanent Ban
|
109
|
+
|
110
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
111
|
+
standards, including sustained inappropriate behavior, harassment of an
|
112
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
113
|
+
|
114
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
115
|
+
community.
|
116
|
+
|
117
|
+
## Attribution
|
118
|
+
|
119
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
120
|
+
version 2.1, available at
|
121
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
122
|
+
|
123
|
+
Community Impact Guidelines were inspired by
|
124
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
125
|
+
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
127
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
128
|
+
[https://www.contributor-covenant.org/translations][translations].
|
129
|
+
|
130
|
+
[homepage]: https://www.contributor-covenant.org
|
131
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
132
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
133
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
134
|
+
[translations]: https://www.contributor-covenant.org/translations
|