Skip to content

Commit 14607fe

Browse files
CodeWithSwastikAstreaTSScclaussizxxrwebsitedesigner123456-stack
authored
Merge master to feature/slash (#283)
* Prefer static_format over format with static assets * GitHub Action to lint Python code * bytes, not Bytes * Update lint_python.yml * Delete lint_python.yml * Fix typos discovered by codespell * Fix typos discovered by codespell * GitHub Action to run codespell * Make id parameter positional only * Code Of conduct is a suggestion by Github * Change `ctx.send` to `ctx.respond` in the README (#197) * Update README.rst * Update README.rst * Added START_EMBEDDED_ACTIVITIES permission #198 (#199) * Use start_embedded_activities instead of create_instant_invite * Use an Enum for embedded activites * Fix error in docstring * Add typehinting to pull request checklist * fix: distribution * change: display text * fixup! Fix typo for overridden * Changed unchanged change * Add *items to View * Add Pycord Development to LICENSE * License updates * Fix accidental deletion in 1257776 * Add dependabot * Add CodeQL * Bump sphinx from 4.0.2 to 4.2.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.0.2 to 4.2.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES) - [Commits](sphinx-doc/sphinx@v4.0.2...v4.2.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Set pycord user-agent (#241) * created delete_after parameter for ctx.respond (#180) * created delete_after parameter for ctx.respond * Update discord/interactions.py Co-authored-by: proguy914629 <[email protected]> * added eventloop thing * fixed ensure_future Co-authored-by: proguy914629 <[email protected]> * Added `on_raw_typing` event (#63) * Added `on_raw_typing` event * Fixes and adjustments for on_raw_typing Co-authored-by: Swas.py <[email protected]> * add support for role icons (#254) * add support for role icons * add unicode_emoji attribute and change Role.edit * role.edit required b64 string for icon * passing None should remove the icon * change documentation to reflect changes * update docstring for Role * invalid sentence * remove unnecessary documentation * add new valid keys * add valid keys * set icon to None if unicode_emoji is passed * Fix typo in docs * Use `ctx.respond` in favor of `ctx.send` * Use `ctx.respond` in favor of `ctx.send` * Added new embedded activites with documentation. (#267) * Added new embedded activities * Removed chess and renamed youtube2 * Documented `EmbeddedActivity` Enumeration * renamed youtube_advance to watch_together and added dev version of it Co-authored-by: Lala Sabathil <[email protected]> * Updated docs with the new naming convention Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> * add support for sending file(s) in interaction response (#263) * add support for sending file(s) in interaction response * update docstring * fix * add ephemeral attribute to Attachment * use dict.get to avoid KeyErrors (#268) * Revert "Add a dunder len to Message (#176)" (#270) This reverts commit 2858bd1. * Add missing flags * Fix typo * Typos .-. * Fix typo Co-authored-by: Sonic4999 <[email protected]> Co-authored-by: Christian Clauss <[email protected]> Co-authored-by: Izhar Ahmad <[email protected]> Co-authored-by: PGamerX <[email protected]> Co-authored-by: Gracie <[email protected]> Co-authored-by: Middledot <[email protected]> Co-authored-by: DeviousLab <[email protected]> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: Aomi Vel <[email protected]> Co-authored-by: BobDotCom <[email protected]> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Webster <[email protected]> Co-authored-by: Cheeseboy8020 <[email protected]> Co-authored-by: proguy914629 <[email protected]> Co-authored-by: Zeffo <[email protected]> Co-authored-by: Prince Raj <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: Lala Sabathil <[email protected]>
1 parent f18dcab commit 14607fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+896
-188
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
- [ ] This PR fixes an issue.
1212
- [ ] This PR adds something new (e.g. new method or parameters).
1313
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
14-
- [ ] This PR is **not** a code change (e.g. documentation, README, ...)
14+
- [ ] This PR is **not** a code change (e.g. documentation, README, typehinting, ...)

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/codeql-analysis.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '26 6 * * 6'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'python' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

.github/workflows/codespell.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: codespell
2+
on: [pull_request, push]
3+
jobs:
4+
codespell:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-python@v2
9+
- run: pip install codespell
10+
- run: codespell --ignore-words-list="groupt,nd,ot"

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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, religion, or sexual identity
10+
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
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances 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
35+
address, 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 moderation
49+
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 e-mail 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 at
63+
Our Discord server.
64+
All 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+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-present Rapptz
3+
Copyright (c) 2015-2021 Rapptz
4+
Copyright (c) 2021-present Pycord Development
45

56
Permission is hereby granted, free of charge, to any person obtaining a
67
copy of this software and associated documentation files (the "Software"),

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Key Features
1919
- Modern Pythonic API using ``async`` and ``await``.
2020
- Proper rate limit handling.
2121
- Optimised in both speed and memory.
22+
- Supports Slash Commands, Context Menus and Message Components.
2223

2324
Installing
2425
----------
@@ -77,11 +78,11 @@ Quick Example
7778
@bot.slash_command()
7879
async def hello(ctx, name: str = None):
7980
name = name or ctx.author.name
80-
await ctx.send(f"Hello {name}!")
81+
await ctx.respond(f"Hello {name}!")
8182
8283
@bot.user_command(name="Say Hello")
8384
async def hi(ctx, user):
84-
await ctx.send(f"{ctx.author.mention} says hello to {user.name}!")
85+
await ctx.respond(f"{ctx.author.mention} says hello to {user.name}!")
8586
8687
bot.run("token")
8788

about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Rapptz, also known as Danny, the maintainer and core developer of discord.py wil
88
Pycord ("py-cord" on PyPI) is a maintained fork of discord.py which will be updated with new changes to the API. Pycord was created by a group of developers that want to continue developing this Python module.
99

1010
## Features
11-
Pycord v1.7.3 is the same as discord.py v1.7.3. However Pycord v2.0.0 will support interactions and other features introduces in v2.0.0a as it's a fork of the master branch. <br>
11+
Pycord v1.7.3 is the same as discord.py v1.7.3. However Pycord v2.0.0 will support interactions and other features introduced in discord.py v2.0.0a as it's a fork of the master branch. <br>
1212
We also have a FAQ channel in our Discord server. You can [click here](https://discord.gg/nRMbjMnxCz) to join.

discord/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
55
A basic wrapper for the Discord API.
66
7-
:copyright: (c) 2015-present Rapptz
7+
:copyright: (c) 2015-2021 Rapptz & (c) 2021-present Pycord Development
88
:license: MIT, see LICENSE for more details.
99
1010
"""
1111

1212
__title__ = 'discord'
13-
__author__ = 'Rapptz'
13+
__author__ = 'Pycord Development'
1414
__license__ = 'MIT'
15-
__copyright__ = 'Copyright 2015-present Rapptz'
15+
__copyright__ = 'Copyright 2015-2021 Rapptz & Copyright 2021-present Pycord Development'
1616
__version__ = '2.0.0a'
1717

1818
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

discord/__main__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
22
The MIT License (MIT)
33
4-
Copyright (c) 2015-present Rapptz
4+
Copyright (c) 2015-2021 Rapptz
5+
Copyright (c) 2021-present Pycord Development
56
67
Permission is hereby granted, free of charge, to any person obtaining a
78
copy of this software and associated documentation files (the "Software"),
@@ -36,11 +37,11 @@ def show_version():
3637

3738
entries.append('- Python v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}'.format(sys.version_info))
3839
version_info = discord.version_info
39-
entries.append('- pycord v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}'.format(version_info))
40+
entries.append('- py-cord v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}'.format(version_info))
4041
if version_info.releaselevel != 'final':
41-
pkg = pkg_resources.get_distribution('pycord')
42+
pkg = pkg_resources.get_distribution('py-cord')
4243
if pkg:
43-
entries.append(f' - pycord pkg_resources: v{pkg.version}')
44+
entries.append(f' - py-cord pkg_resources: v{pkg.version}')
4445

4546
entries.append(f'- aiohttp v{aiohttp.__version__}')
4647
uname = platform.uname()

0 commit comments

Comments
 (0)