5 changed files with 102 additions and 31 deletions
@ -0,0 +1,58 @@ |
|||
selfcord.py |
|||
=========== |
|||
|
|||
.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Frunkit.io%2Fdamiankrawczyk%2Ftelegram-badge%2Fbranches%2Fmaster%3Furl%3Dhttps%3A%2F%2Ft.me%2Fdpy_self |
|||
:target: https://t.me/dpy_self |
|||
:alt: Telegram chat |
|||
.. image:: https://img.shields.io/pypi/v/discord.py-self.svg |
|||
:target: https://pypi.python.org/pypi/discord.py-self |
|||
:alt: PyPI version info |
|||
.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg |
|||
:target: https://pypi.python.org/pypi/discord.py-self |
|||
:alt: PyPI supported Python versions |
|||
.. image:: https://img.shields.io/pypi/dm/discord.py-self.svg |
|||
:target: https://pypi.python.org/pypi/discord.py-self |
|||
:alt: PyPI downloads per month |
|||
|
|||
A modern, easy to use, feature-rich, and async ready API wrapper for Discord's user API written in Python. |
|||
|
|||
Notice |
|||
------- |
|||
|
|||
This branch is just a copy of regular ``discord.py-self`` with the import name changed to ``selfcord``, so ``discord.py-self`` can be used alongside upstream ``discord.py``. Check out the `master branch <https://github.com/dolfies/discord.py-self>`_ for more information. Use of this branch is not recommended, and should only be used if you are using both ``discord.py`` and ``discord.py-self`` in the same *project*. Otherwise, utilize virtual environments to seperate the installs of the two libraries. |
|||
|
|||
This library is 100% compatible with regular ``discord.py-self``, and any documentation, examples, etc. need only the import name changed. |
|||
|
|||
Installing |
|||
---------- |
|||
|
|||
**Python 3.8 or higher is required** |
|||
|
|||
This branch is synced with the master branch on every commit. Because of this, the branch always hosts the current development version. |
|||
|
|||
Because of this, it is *highly* recommended to pin your installation to a certain commit. You can do this like so: |
|||
|
|||
.. code:: sh |
|||
|
|||
# Linux/macOS |
|||
python3 -m pip install git+https://github.com/dolfies/discord.py-self@2193ws21sf4cs74hdg317ac8ad076ed234d3dbf70g1#egg=selfcord.py[voice] |
|||
|
|||
# Windows |
|||
py -3 -m pip install git+https://github.com/dolfies/discord.py-self@2193ws21sf4cs74hdg317ac8ad076ed234d3dbf70g1#egg=selfcord.py[voice] |
|||
|
|||
Otherwise, you can install the current commit: |
|||
|
|||
.. code:: sh |
|||
|
|||
# Linux/macOS |
|||
python3 -m pip install git+https://github.com/dolfies/discord.py-self@renamed#egg=selfcord.py[voice] |
|||
|
|||
# Windows |
|||
py -3 -m pip install git+https://github.com/dolfies/discord.py-self@renamed#egg=selfcord.py[voice] |
|||
|
|||
Links |
|||
------ |
|||
|
|||
- `Documentation <https://discordpy-self.readthedocs.io/en/latest/index.html>`_ |
|||
- `Project updates <https://t.me/dpy_self>`_ |
|||
- `Discussion & support <https://t.me/dpy_self_discussions>`_ |
@ -0,0 +1,34 @@ |
|||
name: rename |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
push: |
|||
branches: |
|||
- master |
|||
|
|||
jobs: |
|||
build: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout repository |
|||
uses: actions/checkout@v2 |
|||
with: |
|||
persist-credentials: false |
|||
fetch-depth: 0 |
|||
|
|||
- name: Replace instances |
|||
run: | |
|||
cp .github/files/README.rst README.rst |
|||
rm -rf docs .github .readthedocs.yml |
|||
mv discord selfcord |
|||
|
|||
sed -i -e 's/import discord/import selfcord/g' -e 's/from discord/from selfcord/g' -e 's/from discord/from selfcord/g' -e 's/discord\.py-self/selfcord\.py/g' -e '/\(discord\.com\|discord\.gg\|discord\.new\)/! s/discord\./selfcord\./g' $(find selfcord examples tests -name "*.py") |
|||
sed -i -e 's/discord/selfcord/g' pyproject.toml MANIFEST.in |
|||
sed -i -e "s/prefix = 'discord'/prefix = 'selfcord'/" setup.py |
|||
|
|||
- name: Push changes |
|||
uses: actions-x/commit@v6 |
|||
with: |
|||
message: Synchronize selfcord |
|||
branch: renamed |
|||
force: true |
@ -1,28 +0,0 @@ |
|||
module.exports = (async function ({github, context}) { |
|||
const pr_number = process.env.PR_NUMBER; |
|||
const pr_operation = process.env.PR_OPERATION; |
|||
|
|||
if (!['created', 'updated'].includes(pr_operation)) { |
|||
console.log('PR was not created as there were no changes.') |
|||
return; |
|||
} |
|||
|
|||
// Close the PR
|
|||
github.issues.update({ |
|||
issue_number: pr_number, |
|||
owner: context.repo.owner, |
|||
repo: context.repo.repo, |
|||
state: 'closed' |
|||
}); |
|||
|
|||
// Wait a moment for GitHub to process it...
|
|||
await new Promise(r => setTimeout(r, 2000)); |
|||
|
|||
// Then reopen the PR so it runs CI
|
|||
github.issues.update({ |
|||
issue_number: pr_number, |
|||
owner: context.repo.owner, |
|||
repo: context.repo.repo, |
|||
state: 'open' |
|||
}); |
|||
}) |
Loading…
Reference in new issue