Skip to content

Commit 0a5aa94

Browse files
authored
Fix file endings (#6002)
1 parent f06b734 commit 0a5aa94

File tree

3 files changed

+401
-401
lines changed

3 files changed

+401
-401
lines changed

docs/autostart_windows.rst

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
.. _autostart_windows:
2-
3-
==============================================
4-
Setting up auto-restart using batch on Windows
5-
==============================================
6-
7-
.. note:: This guide assumes that you already have a working Red instance.
8-
9-
-----------------------
10-
Creating the batch file
11-
-----------------------
12-
13-
Create a new text document anywhere you want to. This file will be used to launch the bot, so you may want to put it somewhere convenient, like Documents or Desktop.
14-
15-
Open that document in Notepad, and paste the following text in it:
16-
17-
.. code-block:: batch
18-
19-
@ECHO OFF
20-
:RED
21-
CALL "%userprofile%\redenv\Scripts\activate.bat"
22-
python -O -m redbot <your instance name>
23-
24-
IF %ERRORLEVEL% NEQ 0 (
25-
ECHO Restarting Red...
26-
GOTO RED
27-
)
28-
29-
Replace ``<your instance name>`` with the instance name of your bot.
30-
If you created your VENV at a location other than the recommended one, replace ``%userprofile%\redenv\Scripts\activate.bat`` with the path to your VENV.
31-
32-
Click "File", "Save as". Change the dropdown "Save as type" to "All Files (*.*)". Set the filename to ``start_redbot.bat``, and click save.
33-
34-
There should now be a new file in the location you created the text document in. You can delete that text document as it is no longer needed.
35-
You can now use the ``start_redbot.bat`` batch file to launch Red by double clicking it.
36-
This script will automatically restart red when the ``[p]restart`` command is used or when the bot shuts down abnormally.
37-
38-
-------------------------
39-
Launch the bot on startup
40-
-------------------------
41-
42-
Create a shortcut of your ``start_redbot.bat`` file.
43-
44-
Open the "Run" dialogue box using Windows Key + R.
45-
46-
Enter ``shell:startup`` if you want the bot to launch only when the current user logs in, or ``shell:common startup`` if you want the bot to launch when any user logs in.
47-
48-
Drag the shortcut into the folder that is opened. The bot will now launch on startup.
1+
.. _autostart_windows:
2+
3+
==============================================
4+
Setting up auto-restart using batch on Windows
5+
==============================================
6+
7+
.. note:: This guide assumes that you already have a working Red instance.
8+
9+
-----------------------
10+
Creating the batch file
11+
-----------------------
12+
13+
Create a new text document anywhere you want to. This file will be used to launch the bot, so you may want to put it somewhere convenient, like Documents or Desktop.
14+
15+
Open that document in Notepad, and paste the following text in it:
16+
17+
.. code-block:: batch
18+
19+
@ECHO OFF
20+
:RED
21+
CALL "%userprofile%\redenv\Scripts\activate.bat"
22+
python -O -m redbot <your instance name>
23+
24+
IF %ERRORLEVEL% NEQ 0 (
25+
ECHO Restarting Red...
26+
GOTO RED
27+
)
28+
29+
Replace ``<your instance name>`` with the instance name of your bot.
30+
If you created your VENV at a location other than the recommended one, replace ``%userprofile%\redenv\Scripts\activate.bat`` with the path to your VENV.
31+
32+
Click "File", "Save as". Change the dropdown "Save as type" to "All Files (*.*)". Set the filename to ``start_redbot.bat``, and click save.
33+
34+
There should now be a new file in the location you created the text document in. You can delete that text document as it is no longer needed.
35+
You can now use the ``start_redbot.bat`` batch file to launch Red by double clicking it.
36+
This script will automatically restart red when the ``[p]restart`` command is used or when the bot shuts down abnormally.
37+
38+
-------------------------
39+
Launch the bot on startup
40+
-------------------------
41+
42+
Create a shortcut of your ``start_redbot.bat`` file.
43+
44+
Open the "Run" dialogue box using Windows Key + R.
45+
46+
Enter ``shell:startup`` if you want the bot to launch only when the current user logs in, or ``shell:common startup`` if you want the bot to launch when any user logs in.
47+
48+
Drag the shortcut into the folder that is opened. The bot will now launch on startup.

docs/framework_tree.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
.. tree module docs
2-
3-
====
4-
Tree
5-
====
6-
7-
Red uses a subclass of discord.py's ``CommandTree`` object in order to allow Cog Creators to add application commands to their cogs without worrying about the command count limit and to support caching ``AppCommand`` objects. When an app command is added to the bot's tree, it will not show up in ``tree.get_commands`` or other similar methods unless the command is "enabled" with ``[p]slash enable`` (similar to "load"ing a cog) and ``tree.red_check_enabled`` has been run since the command was added to the tree.
8-
9-
.. note::
10-
11-
If you are adding app commands to the tree during load time, the loading process will call ``tree.red_check_enabled`` for your cog and its app commands. If you are adding app commands to the bot **outside of load time**, a call to ``tree.red_check_enabled`` after adding the commands is required to ensure the commands will appear properly.
12-
13-
If application commands from your cog show up in ``[p]slash list`` as enabled from an ``(unknown)`` cog and disabled from your cog at the same time, you did not follow the instructions above. You must manually call ``tree.red_check_enabled`` **after** adding the commands to the tree.
14-
15-
.. automodule:: redbot.core.tree
16-
17-
RedTree
18-
^^^^^^^
19-
20-
.. autoclass:: RedTree
21-
:members:
1+
.. tree module docs
2+
3+
====
4+
Tree
5+
====
6+
7+
Red uses a subclass of discord.py's ``CommandTree`` object in order to allow Cog Creators to add application commands to their cogs without worrying about the command count limit and to support caching ``AppCommand`` objects. When an app command is added to the bot's tree, it will not show up in ``tree.get_commands`` or other similar methods unless the command is "enabled" with ``[p]slash enable`` (similar to "load"ing a cog) and ``tree.red_check_enabled`` has been run since the command was added to the tree.
8+
9+
.. note::
10+
11+
If you are adding app commands to the tree during load time, the loading process will call ``tree.red_check_enabled`` for your cog and its app commands. If you are adding app commands to the bot **outside of load time**, a call to ``tree.red_check_enabled`` after adding the commands is required to ensure the commands will appear properly.
12+
13+
If application commands from your cog show up in ``[p]slash list`` as enabled from an ``(unknown)`` cog and disabled from your cog at the same time, you did not follow the instructions above. You must manually call ``tree.red_check_enabled`` **after** adding the commands to the tree.
14+
15+
.. automodule:: redbot.core.tree
16+
17+
RedTree
18+
^^^^^^^
19+
20+
.. autoclass:: RedTree
21+
:members:

0 commit comments

Comments
 (0)