@@ -57,31 +57,7 @@ cd botkit
5757> [ !NOTE] Cloning the repository creates a local copy of Botkit on your machine,
5858> allowing you to build your bot using the Botkit framework.
5959
60- ## Step 3: Set Up a Virtual Environment (Optional but Recommended)
61-
62- It's a good practice to use a virtual environment for your Python projects. This keeps
63- your project dependencies isolated from your system-wide Python installation.
64-
65- 1 . Create a virtual environment:
66-
67- ``` bash
68- python -m venv venv
69- ```
70-
71- 2 . Activate the virtual environment:
72- - On Windows:
73- ```
74- venv\Scripts\activate
75- ```
76- - On macOS and Linux:
77- ```
78- source venv/bin/activate
79- ```
80-
81- > [!TIP] You'll know the virtual environment is active when you see `(venv)` at the
82- > beginning of your terminal prompt.
83-
84- ## Step 4: Install Dependencies
60+ ## Step 3: Install Dependencies
8561
8662Install the required dependencies using PDM (Python Dependency Manager):
8763
@@ -100,7 +76,7 @@ pdm install
10076> [ !NOTE] PDM will read the ` pyproject.toml ` file and install all necessary dependencies
10177> for Botkit.
10278
103- ## Step 5 : Configure Your Bot
79+ ## Step 4 : Configure Your Bot
10480
105811 . In the root directory of your Botkit project, create a file named ` config.yml ` .
106822 . Open ` config.yml ` in a text editor and add the following content:
@@ -117,7 +93,7 @@ Replace `YOUR_BOT_TOKEN_HERE` with the actual token of your Discord bot.
11793> [!CAUTION] Never share your bot token publicly or commit it to version control. Treat
11894> it like a password.
11995
120- # # Step 6 : Create a New Extension Folder
96+ # # Step 5 : Create a New Extension Folder
12197
12298Now, let's create a new folder for our extension :
12399
@@ -128,7 +104,7 @@ Now, let's create a new folder for our extension:
128104mkdir src/extensions/my_first_extension
129105` ` `
130106
131- # # Step 7 : Create the `__init__.py` File
107+ # # Step 6 : Create the `__init__.py` File
132108
133109The `__init__.py` file is crucial for Python to recognize the directory as a package :
134110
@@ -150,7 +126,7 @@ __all__ = ["setup", "default"]
150126> (which we'll create next). It allows Botkit to access these components when loading
151127> the extension.
152128
153- # # Step 8 : Create the `main.py` File
129+ # # Step 7 : Create the `main.py` File
154130
155131The `main.py` file will contain the main logic for our extension :
156132
@@ -192,7 +168,7 @@ Let's break down what we've done here:
192168> [!TIP] Using type hints (like `bot: discord.Bot`) helps catch errors early and
193169> improves code readability. It's a good practice to use them consistently in your code.
194170
195- # # Step 9 : Adding Commands
171+ # # Step 8 : Adding Commands
196172
197173Now, let's add some commands to our extension. We'll create a simple "hello" command and
198174a more complex "userinfo" command.
@@ -240,7 +216,7 @@ Let's explain these commands:
240216> better user experience and are easier to discover than traditional prefix-based
241217> commands.
242218
243- # # Step 10 : Adding an Event Listener
219+ # # Step 9 : Adding an Event Listener
244220
245221Let's add an event listener to our extension to demonstrate how to respond to Discord
246222events. We'll add a simple listener that logs when the bot is ready.
@@ -259,7 +235,7 @@ connected to Discord.
259235> [!TIP] Event listeners are great for performing actions based on Discord events, such
260236> as when a member joins a server or when a message is deleted.
261237
262- # # Step 11 : Final `main.py` File
238+ # # Step 10 : Final `main.py` File
263239
264240Your complete `main.py` file should now look like this :
265241
@@ -303,7 +279,7 @@ default = {
303279}
304280` ` `
305281
306- # # Step 12 : Running Your Bot
282+ # # Step 11 : Running Your Bot
307283
308284Now that we've created our extension, let's run the bot :
309285
0 commit comments