mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
Merge branch 'V3/develop' into cog_guide_core
This commit is contained in:
@@ -32,7 +32,7 @@ Next, your python :code:`path` can be fetched with the following commands:
|
||||
|
||||
Then create the new service file:
|
||||
|
||||
:code:`sudo -e /etc/systemd/system/red@.service`
|
||||
:code:`sudo nano /etc/systemd/system/red@.service`
|
||||
|
||||
Paste the following in the file, and replace all instances of :code:`username` with the Linux username you retrieved above, and :code:`path` with the python path you retrieved above.
|
||||
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
.. 3.4.x Changelogs
|
||||
|
||||
Redbot 3.4.7 (2021-02-26)
|
||||
=========================
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`elijabesu`, :ghuser:`Flame442`, :ghuser:`flaree`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`kreusada`, :ghuser:`palmtree5`, :ghuser:`TrustyJAID`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
- Added proper permission checks to ``[p]muteset senddm`` and ``[p]muteset showmoderator`` (:issue:`4849`)
|
||||
- Updated the ``[p]lmgtfy`` command to use the new domain (:issue:`4840`)
|
||||
- Updated the ``[p]info`` command to more clearly indicate that the instance is owned by a team (:issue:`4851`)
|
||||
- Fixed minor issues with error messages in Mutes cog (:issue:`4847`, :issue:`4850`, :issue:`4853`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added `cog guide for General cog <cog_guides/general>` (:issue:`4797`)
|
||||
- Added `cog guide for Trivia cog <cog_guides/trivia>` (:issue:`4566`)
|
||||
|
||||
|
||||
Redbot 3.4.6 (2021-02-16)
|
||||
=========================
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
@@ -28,7 +48,7 @@ Core Bot
|
||||
- The colors used have been adjusted to be readable on many more terminal applications
|
||||
- The ``NO_COLOR`` environment variable can now be set to forcefully disable all colors in the console output
|
||||
- Tracebacks will now use the full width of the terminal again
|
||||
- Tracebacks no longer contain multiple lines per stack level (this can now be changed with the flag ``-rich-traceback-extra-lines``)
|
||||
- Tracebacks no longer contain multiple lines per stack level (this can now be changed with the flag ``--rich-traceback-extra-lines``)
|
||||
- Disabled syntax highlighting on the log messages
|
||||
- Dev cog no longer captures logging output
|
||||
- Added some cool features for developers
|
||||
|
||||
205
docs/cog_guides/image.rst
Normal file
205
docs/cog_guides/image.rst
Normal file
@@ -0,0 +1,205 @@
|
||||
.. _image:
|
||||
|
||||
=====
|
||||
Image
|
||||
=====
|
||||
|
||||
This is the cog guide for the image cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load image
|
||||
|
||||
.. _image-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog provides commands for retrieving pictures from
|
||||
websites such as Giphy and Imgur.
|
||||
|
||||
.. _image-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here's a list of all commands available for this cog.
|
||||
|
||||
.. _image-command-gif:
|
||||
|
||||
^^^
|
||||
gif
|
||||
^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]gif <keywords...>
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve the first search result from Giphy. This command requires API tokens
|
||||
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<keywords...>``: The keywords used to search Giphy.
|
||||
|
||||
.. _image-command-gifr:
|
||||
|
||||
^^^^
|
||||
gifr
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]gifr <keywords...>
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve a random GIF from a Giphy search. This command requires API tokens
|
||||
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<keywords...>``: The keywords used to generate a random GIF.
|
||||
|
||||
.. _image-command-imgur:
|
||||
|
||||
^^^^^
|
||||
imgur
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieves pictures from Imgur. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
.. _image-command-imgur-search:
|
||||
|
||||
""""""""""""
|
||||
imgur search
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur search [count=1] <terms...>
|
||||
|
||||
**Description**
|
||||
|
||||
Search for pictures on Imgur. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[count]``: How many images should be returned (maximum 5). Defaults to 1.
|
||||
|
||||
* ``<terms...>``: The terms used to search Imgur.
|
||||
|
||||
.. _image-command-imgur-subreddit:
|
||||
|
||||
"""""""""""""""
|
||||
imgur subreddit
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur subreddit <subreddit> [count=1] [sort_type=top] [window=day]
|
||||
|
||||
**Description**
|
||||
|
||||
Get images from a subreddit. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<subreddit>``: The subreddit to get images from.
|
||||
|
||||
* ``[count]``: The number of images to return (maximum 5). Defaults to 1.
|
||||
|
||||
* ``[sort_type]``: New, or top results. Defaults to top.
|
||||
|
||||
* ``[window]``: The timeframe, can be the past day, week, month, year or all. Defaults to day.
|
||||
|
||||
.. _image-command-giphycreds:
|
||||
|
||||
^^^^^^^^^^
|
||||
giphycreds
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]giphycreds
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set GIPHY API tokens.
|
||||
|
||||
**Getting your API key**
|
||||
|
||||
1. Login (or create) a GIPHY account.
|
||||
2. Visit `this page <https://developers.giphy.com/dashboard>`__.
|
||||
3. Press 'Create an App'.
|
||||
4. Click 'Select API', and then 'Next Step'.
|
||||
5. Add an app name, for example 'Red'.
|
||||
6. Add an app description, for example 'Used for Red's image cog'.
|
||||
7. Click 'Create App'. You'll need to agree to the GIPHY API terms.
|
||||
8. Copy the API Key.
|
||||
9. In Discord, run the following command::
|
||||
|
||||
[p]set api GIPHY api_key <your_api_key_here>
|
||||
|
||||
.. _image-command-imgurcreds:
|
||||
|
||||
^^^^^^^^^^
|
||||
imgurcreds
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgurcreds
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set Imgur API tokens.
|
||||
|
||||
**Getting your API key**
|
||||
|
||||
1. Login to (or create) an Imgur account.
|
||||
2. Visit `this page <https://api.imgur.com/oauth2/addclient>`__.
|
||||
3. Add an app name for your application, for example 'Red'.
|
||||
4. Select 'Anonymous usage without user authorization' for the auth type.
|
||||
5. Set the authorization callback URL to ``https://localhost``
|
||||
6. Leave the app website blank.
|
||||
7. Enter a valid email address and a description.
|
||||
8. Check the captcha box and click next.
|
||||
9. Your Client ID will be on the next page.
|
||||
10. In Discord, run the following command::
|
||||
|
||||
[p]set api imgur client_id <your_client_id_here>
|
||||
@@ -43,6 +43,7 @@ Welcome to Red - Discord Bot's documentation!
|
||||
cog_guides/economy
|
||||
cog_guides/filter
|
||||
cog_guides/general
|
||||
cog_guides/image
|
||||
cog_guides/streams
|
||||
cog_guides/trivia
|
||||
red_core_data_statement
|
||||
|
||||
@@ -22,8 +22,7 @@ The pre-requirements are:
|
||||
- Git 2.11+
|
||||
- Java Runtime Environment 11 (for audio support)
|
||||
|
||||
We also recommend installing some basic compiler tools, in case our dependencies don't provide
|
||||
pre-built "wheels" for your architecture.
|
||||
We recommend installing the nano text editor as our guides may instruct you to create or edit some files. We also recommend installing some basic compiler tools in case our dependencies don't provide pre-built "wheels" for your architecture.
|
||||
|
||||
|
||||
*****************
|
||||
@@ -43,7 +42,7 @@ Arch Linux
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo pacman -Syu python python-pip git jre11-openjdk-headless base-devel
|
||||
sudo pacman -Syu python python-pip git jre11-openjdk-headless base-devel nano
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
@@ -59,7 +58,7 @@ CentOS and RHEL 7
|
||||
.. code-block:: none
|
||||
|
||||
sudo yum -y groupinstall development
|
||||
sudo yum -y install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel tk-devel libffi-devel findutils java-11-openjdk-headless
|
||||
sudo yum -y install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel tk-devel libffi-devel findutils java-11-openjdk-headless nano
|
||||
sudo yum -y install centos-release-scl
|
||||
sudo yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
|
||||
echo "source scl_source enable devtoolset-8" >> ~/.bashrc
|
||||
@@ -88,7 +87,7 @@ CentOS and RHEL 8
|
||||
sudo yum -y install epel-release
|
||||
sudo yum -y update
|
||||
sudo yum -y groupinstall development
|
||||
sudo yum -y install git zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel tk-devel libffi-devel findutils java-11-openjdk-headless
|
||||
sudo yum -y install git zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel tk-devel libffi-devel findutils java-11-openjdk-headless nano
|
||||
|
||||
Complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
|
||||
@@ -107,7 +106,7 @@ Debian/Raspbian Buster. This guide will tell you how. First, run the following c
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
Complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
@@ -120,12 +119,12 @@ Complete the rest of the installation by `installing Python 3.8 with pyenv <inst
|
||||
Fedora Linux
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Fedora Linux 31 and above has all required packages available in official repositories. Install
|
||||
Fedora Linux 32 and above has all required packages available in official repositories. Install
|
||||
them with dnf:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo dnf -y install python38 git java-11-openjdk-headless @development-tools
|
||||
sudo dnf -y install python38 git java-11-openjdk-headless @development-tools nano
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
@@ -153,7 +152,7 @@ one-by-one:
|
||||
echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.profile
|
||||
source ~/.profile
|
||||
brew install git
|
||||
brew cask install adoptopenjdk/openjdk/adoptopenjdk11
|
||||
brew install --cask adoptopenjdk/openjdk/adoptopenjdk11
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
@@ -165,10 +164,10 @@ Continue by `creating-venv-linux`.
|
||||
openSUSE
|
||||
~~~~~~~~
|
||||
|
||||
openSUSE Leap 15.1+
|
||||
openSUSE Leap 15.2+
|
||||
*******************
|
||||
|
||||
We recommend installing a community package to get Python 3.8 on openSUSE Leap 15.1+. This package will
|
||||
We recommend installing a community package to get Python 3.8 on openSUSE Leap 15.2+. This package will
|
||||
be installed to the ``/opt`` directory.
|
||||
|
||||
First, add the Opt-Python community repository:
|
||||
@@ -183,7 +182,7 @@ Now install the pre-requirements with zypper:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo zypper -n install opt-python38 opt-python38-setuptools git-core java-11-openjdk-headless
|
||||
sudo zypper -n install opt-python38 opt-python38-setuptools git-core java-11-openjdk-headless nano
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
Since Python is now installed to ``/opt/python``, we should add it to PATH. You can add a file in
|
||||
@@ -210,7 +209,7 @@ with zypper:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo zypper -n install python3-base python3-pip git-core java-11-openjdk-headless
|
||||
sudo zypper -n install python3-base python3-pip git-core java-11-openjdk-headless nano
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
@@ -241,7 +240,7 @@ Now install the pre-requirements with apt:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless build-essential
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless build-essential nano
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
@@ -265,7 +264,7 @@ Now install the pre-requirements with apt:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless build-essential
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless build-essential nano
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
@@ -290,7 +289,7 @@ installing pyenv. To do this, first run the following commands:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
And then complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
@@ -323,7 +322,7 @@ Then run the following command:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.7 -v
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.8 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
@@ -335,7 +334,7 @@ After that is finished, run:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
pyenv global 3.8.7
|
||||
pyenv global 3.8.8
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.8.
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Then run each of the following commands:
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
choco upgrade git --params "/GitOnlyOnPath /WindowsTerminal" -y
|
||||
choco upgrade visualstudio2019-workload-vctools -y
|
||||
choco upgrade python3 -y --version 3.8.7
|
||||
choco upgrade python3 -y --version 3.8.8
|
||||
|
||||
For Audio support, you should also run the following command before exiting:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user