the-draupnir-project / Draupnir

A Matrix moderation bot
https://the-draupnir-project.github.io/draupnir-documentation/
70 stars 14 forks source link

@FSG-Cat reports that the `config get` command doesn't appear in help for whatever reason (ie the command is undefined) #407

Open Gnuxie opened 2 months ago

FSG-Cat commented 2 months ago
{
  "content": {
    "body": "<details><summary>**draupnir commands:**</summary><details><summary>`status` - Show the status of the bot.</summary></details><details><summary>`list create <shortcode> <alias name>` - Create a new Policy Room which can be used to ban users, rooms and servers from your protected rooms</summary>**Parameters:**\nshortcode - no description\nalias name - no description\n</details><details><summary>`ban <entity> <list> [...reason]` - Bans an entity from the policy list.</summary>**Parameters:**\nentity - no description\nlist - no description\n</details><details><summary>`help [...command parts]` - Display this message</summary></details><details><summary>`import <import from room> <policy room>` - Import user and server bans from a Matrix room and add them to a policy room.</summary>**Parameters:**\nimport from room - no description\npolicy room - no description\n</details><details><summary>`kick <user> [--dry-run] [--glob] [--room]` - Kicks a user or all of those matching a glob in a particular room or all protected rooms. `--glob` must be provided to use globs. Can be scoped to a specific room with `--room`. Can be dry run with `--dry-run`.</summary>**Parameters:**\nuser - no description\n</details><details><summary>`verify` - Verify the permissions that draupnir has.</summary></details><details><summary>`protections enable <protection name> [--limit]` - Enable a named protection.</summary>**Parameters:**\nprotection name - no description\n</details><details><summary>`protections disable <protection name>` - Disable a protection.</summary>**Parameters:**\nprotection name - no description\n</details><details><summary>`protections config set <protection name> <setting name> <new value>` - Set a new value for the protection setting, if the setting is a collection    then this will write over the entire collection.</summary>**Parameters:**\nprotection name - The name of the protection to be modified.\nsetting name - The name of the setting within the protection config to modify.\nnew value - The new value to give the protection setting\n</details><details><summary>`protections config add <item>` - Add an item to a collection protection setting.</summary>**Parameters:**\nitem - An item to add to the collection setting.\n</details><details><summary>`protections config remove <item>` - Remove an item from a collection protection setting.</summary>**Parameters:**\nitem - An item to remove from a collection setting.\n</details><details><summary>`protections` - List all available protections.</summary></details><details><summary>`redact <entity> [...reason] [--limit] [--room]` - Redacts either a users's recent messagaes within protected rooms or a specific message shared with the bot.</summary>**Parameters:**\nentity - no description\n</details><details><summary>`resolve <alias>` - Resolve a room alias.</summary>**Parameters:**\nalias - no description\n</details><details><summary>`rooms` - List all of the protected rooms.</summary></details><details><summary>`rooms add <room>` - Protect the room using the watched policy lists, banning users and synchronizing server ACL.</summary>**Parameters:**\nroom - The room to protect.\n</details><details><summary>`rooms remove <room>` - Stop protecting the room and leave.</summary>**Parameters:**\nroom - The room to stop protecting.\n</details><details><summary>`rules` - Lists the rules currently in use by Mjolnir.</summary></details><details><summary>`rules matching <entity>` - Lists the rules in use that will match this entity e.g. `!rules matching @foo:example.com` will show all the user and server rules, including globs, that match this user</summary>**Parameters:**\nentity - no description\n</details><details><summary>`displayname [...displayname]` - Sets the displayname of the draupnir instance to the specified value in all rooms.</summary></details><details><summary>`powerlevel <user> <power level> [...rooms]` - Set the power level of a user across the protected rooms set, or within the provided rooms</summary>**Parameters:**\nuser - no description\npower level - no description\n</details><details><summary>`unban <entity> <list> [--true]` - Removes an entity from a policy list. If the entity is a glob, then the flag --true must be provided to unban users matching the glob from all protected rooms.</summary>**Parameters:**\nentity - no description\nlist - no description\n</details><details><summary>`watch <list>` - Watches a list and applies the list's assocated policies to draupnir's protected rooms.</summary>**Parameters:**\nlist - no description\n</details><details><summary>`unwatch <list>` - Unwatches a list and stops applying the list's assocated policies to draupnir's protected rooms.</summary>**Parameters:**\nlist - no description\n</details><details><summary>**synapse admin commands:**</summary><details><summary>`alias move <alias> <new room>` - Move an alias from one room to another.</summary>**Parameters:**\nalias - The alias that should be moved.\nnew room - The room to move the alias to.\n</details><details><summary>`alias add <alias> <target room>` - Add a new alias to a room.</summary>**Parameters:**\nalias - The alias that should be created.\ntarget room - The room to add the alias to.\n</details><details><summary>`alias remove <alias>` - Removes an alias from a room.</summary>**Parameters:**\nalias - The alias that should be deleted.\n</details><details><summary>`deactivate <user>` - Deactivates the user on the homeserver, preventing use of the account.</summary>**Parameters:**\nuser - no description\n</details><details><summary>`hijack room <room> <user>` - Make the specified user the admin of a room via the synapse admin API</summary>**Parameters:**\nroom - no description\nuser - no description\n</details><details><summary>`shutdown room <room> [...reason]` - Prevents access to the the room on this server and sends a message to all users that they have violated the terms of service.</summary>**Parameters:**\nroom - no description\n</details></details></details>",
    "format": "org.matrix.custom.html",
    "formatted_body": "<details><summary><b>draupnir commands:</b></summary><details><summary><code>status</code> - Show the status of the bot.</summary></details><details><summary><code>list create &lt;shortcode&gt; &lt;alias name&gt;</code> - Create a new Policy Room which can be used to ban users, rooms and servers from your protected rooms</summary><b>Parameters:</b><br/>shortcode - no description<br/>alias name - no description<br/></details><details><summary><code>ban &lt;entity&gt; &lt;list&gt; [...reason]</code> - Bans an entity from the policy list.</summary><b>Parameters:</b><br/>entity - no description<br/>list - no description<br/></details><details><summary><code>help [...command parts]</code> - Display this message</summary></details><details><summary><code>import &lt;import from room&gt; &lt;policy room&gt;</code> - Import user and server bans from a Matrix room and add them to a policy room.</summary><b>Parameters:</b><br/>import from room - no description<br/>policy room - no description<br/></details><details><summary><code>kick &lt;user&gt; [--dry-run] [--glob] [--room]</code> - Kicks a user or all of those matching a glob in a particular room or all protected rooms. `--glob` must be provided to use globs. Can be scoped to a specific room with `--room`. Can be dry run with `--dry-run`.</summary><b>Parameters:</b><br/>user - no description<br/></details><details><summary><code>verify</code> - Verify the permissions that draupnir has.</summary></details><details><summary><code>protections enable &lt;protection name&gt; [--limit]</code> - Enable a named protection.</summary><b>Parameters:</b><br/>protection name - no description<br/></details><details><summary><code>protections disable &lt;protection name&gt;</code> - Disable a protection.</summary><b>Parameters:</b><br/>protection name - no description<br/></details><details><summary><code>protections config set &lt;protection name&gt; &lt;setting name&gt; &lt;new value&gt;</code> - Set a new value for the protection setting, if the setting is a collection    then this will write over the entire collection.</summary><b>Parameters:</b><br/>protection name - The name of the protection to be modified.<br/>setting name - The name of the setting within the protection config to modify.<br/>new value - The new value to give the protection setting<br/></details><details><summary><code>protections config add &lt;item&gt;</code> - Add an item to a collection protection setting.</summary><b>Parameters:</b><br/>item - An item to add to the collection setting.<br/></details><details><summary><code>protections config remove &lt;item&gt;</code> - Remove an item from a collection protection setting.</summary><b>Parameters:</b><br/>item - An item to remove from a collection setting.<br/></details><details><summary><code>protections</code> - List all available protections.</summary></details><details><summary><code>redact &lt;entity&gt; [...reason] [--limit] [--room]</code> - Redacts either a users's recent messagaes within protected rooms or a specific message shared with the bot.</summary><b>Parameters:</b><br/>entity - no description<br/></details><details><summary><code>resolve &lt;alias&gt;</code> - Resolve a room alias.</summary><b>Parameters:</b><br/>alias - no description<br/></details><details><summary><code>rooms</code> - List all of the protected rooms.</summary></details><details><summary><code>rooms add &lt;room&gt;</code> - Protect the room using the watched policy lists, banning users and synchronizing server ACL.</summary><b>Parameters:</b><br/>room - The room to protect.<br/></details><details><summary><code>rooms remove &lt;room&gt;</code> - Stop protecting the room and leave.</summary><b>Parameters:</b><br/>room - The room to stop protecting.<br/></details><details><summary><code>rules</code> - Lists the rules currently in use by Mjolnir.</summary></details><details><summary><code>rules matching &lt;entity&gt;</code> - Lists the rules in use that will match this entity e.g. `!rules matching @foo:example.com` will show all the user and server rules, including globs, that match this user</summary><b>Parameters:</b><br/>entity - no description<br/></details><details><summary><code>displayname [...displayname]</code> - Sets the displayname of the draupnir instance to the specified value in all rooms.</summary></details><details><summary><code>powerlevel &lt;user&gt; &lt;power level&gt; [...rooms]</code> - Set the power level of a user across the protected rooms set, or within the provided rooms</summary><b>Parameters:</b><br/>user - no description<br/>power level - no description<br/></details><details><summary><code>unban &lt;entity&gt; &lt;list&gt; [--true]</code> - Removes an entity from a policy list. If the entity is a glob, then the flag --true must be provided to unban users matching the glob from all protected rooms.</summary><b>Parameters:</b><br/>entity - no description<br/>list - no description<br/></details><details><summary><code>watch &lt;list&gt;</code> - Watches a list and applies the list's assocated policies to draupnir's protected rooms.</summary><b>Parameters:</b><br/>list - no description<br/></details><details><summary><code>unwatch &lt;list&gt;</code> - Unwatches a list and stops applying the list's assocated policies to draupnir's protected rooms.</summary><b>Parameters:</b><br/>list - no description<br/></details><details><summary><b>synapse admin commands:</b></summary><details><summary><code>alias move &lt;alias&gt; &lt;new room&gt;</code> - Move an alias from one room to another.</summary><b>Parameters:</b><br/>alias - The alias that should be moved.<br/>new room - The room to move the alias to.<br/></details><details><summary><code>alias add &lt;alias&gt; &lt;target room&gt;</code> - Add a new alias to a room.</summary><b>Parameters:</b><br/>alias - The alias that should be created.<br/>target room - The room to add the alias to.<br/></details><details><summary><code>alias remove &lt;alias&gt;</code> - Removes an alias from a room.</summary><b>Parameters:</b><br/>alias - The alias that should be deleted.<br/></details><details><summary><code>deactivate &lt;user&gt;</code> - Deactivates the user on the homeserver, preventing use of the account.</summary><b>Parameters:</b><br/>user - no description<br/></details><details><summary><code>hijack room &lt;room&gt; &lt;user&gt;</code> - Make the specified user the admin of a room via the synapse admin API</summary><b>Parameters:</b><br/>room - no description<br/>user - no description<br/></details><details><summary><code>shutdown room &lt;room&gt; [...reason]</code> - Prevents access to the the room on this server and sends a message to all users that they have violated the terms of service.</summary><b>Parameters:</b><br/>room - no description<br/></details></details></details>",
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "$0yXZAvYpbuv6HKxI3AQkXuDuiP8iANX2AUCi1bJ4Jqc"
      }
    },
    "msgtype": "m.notice"
  },
  "origin_server_ts": 1715016944557,
  "sender": "@bot.mjolnir:feline.support",
  "type": "m.room.message",
  "unsigned": {
    "age": 125
  },
  "event_id": "",
  "room_id": ""
}

Theres a copy of the event for anyone who wants to dig thru and check if im telling the truth about that its missing.