# python-app-rocketbot Experimental Discord bot written in Python. ## Usage * To see the list of commands, type `$rb_help`. * To get help on a specific command, type `$rb_help commandname` (don't prefix the command name you want help on). E.g. `$rb_help hello`. * To get help on a command group, type `$rb_help groupname`. E.g. `$rb_help config`. * To get help on a subcommand in a group, type `$rb_help groupname commandname`. E.g. `$rb_help config setwarningchannel`. * To see if the bot is alive, type `$rb_hello`. * Other commands are too numerous and always changing to document here, so see `$rb_help` for more. ## Setup 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. Create a "config" subdirectory under your source folder. This is where guild-specific configuration is written as JSON files. To start, run `python3 bot.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. Once running, you should immediately set up a warning channel and optionally a user/role to tag in warning messages. Go to a channel you want warnings to be posted (typically a channel the general userbase cannot see) and type `$rb_config setwarningchannel`. This will set that channel as the destination for warnings about suspicious behavior on the server. To have these messages tag a user or role (such as `@Mods`), type `$rb_config setwarningmention @userorrole`. This must be an actual autocompleted @ mention that shows up in a different color, not just the name of the user/role. Otherwise warning messages will be prefixed with that plaintext name, not with an actual @. To mention several people or roles, enclose the whole list in double quotes. E.g. `$rb_config setwarningmention "@Mod @Admin"`. You can test out this configuration by entering `$rb_testwarn` to issue a test warning.