Преглед на файлове

Updating readme and main source

tags/1.0.1
Rocketsoup преди 4 години
родител
ревизия
2b53be6476
променени са 2 файла, в които са добавени 23 реда и са изтрити 3 реда
  1. 17
    1
      README.md
  2. 6
    2
      rocketbot.py

+ 17
- 1
README.md Целия файл

@@ -1,3 +1,19 @@
1 1
 # python-app-rocketbot
2 2
 
3
-Experimental Discord bot written in Python and hosted in Django
3
+Experimental Discord bot written in Python.
4
+
5
+## Usage
6
+
7
+* To see the list of commands, type `$rb_help`.
8
+* To get help on a specific command, type `$rb_help command` (don't prefix the command name you want help on)
9
+* To get help on a command group, type `$rb_help group`
10
+* To get help on a subcommand in a group, type `$rb_help group command`
11
+* To see if the bot is alive, type `$rb_hello`
12
+
13
+## Setup
14
+
15
+Currently the bot is just run in the console locally. It blocks until Ctrl+C is pressed. Before running, you must copy config.py.sample to config.py and fill in the "client_token" value. To get a token, visit https://discord.com/developers/applications and create an application. Then create a bot for the application and enable the "server members intent". Click the "copy" button in the "token" section near the top and paste this value into config.py's "client_token" attribute.
16
+
17
+Create a "config" subdirectory under your source folder. This is where guild-specific configuration is written as JSON files.
18
+
19
+To start, run `python3 rocketbot.py`. Then visit https://discord.com/oauth2/authorize?client_id=[application_id]&scope=bot&permissions=395204357318, where [application_id] is the "application id" value on your app configuration "general information" page. Once invited, test if the bot is working by typing `$rb_hello` in your Discord server.

+ 6
- 2
rocketbot.py Целия файл

@@ -1,6 +1,6 @@
1 1
 """
2
-Rocketbot Discord bot. Relies on a configured config.py (copy config.py.sample for a template) and
3
-the sqlite database rocketbot.db (copy rocketbot.db.sample for a blank database).
2
+Rocketbot Discord bot. Relies on a configured config.py (copy config.py.sample
3
+for a template).
4 4
 
5 5
 Author: Ian Albert (@rocketsoup)
6 6
 Date: 2021-11-11
@@ -18,6 +18,10 @@ from cogs.urlspamcog import URLSpamCog
18 18
 
19 19
 CURRENT_CONFIG_VERSION = 3
20 20
 if (CONFIG.get('__config_version') or 0) < CURRENT_CONFIG_VERSION:
21
+    # If you're getting this error, it means something changed in config.py's
22
+    # format. Consult config.py.sample and compare it to your own config.py.
23
+    # Rename/move any values as needed. When satisfied, update "__config_version"
24
+    # to the value in config.py.sample.
21 25
     raise RuntimeError('config.py format may be outdated. Review ' +
22 26
         'config.py.sample, update the "__config_version" field to ' +
23 27
         f'{CURRENT_CONFIG_VERSION}, and try again.')

Loading…
Отказ
Запис