Add staffmsg

2025-09-24 00:39:47 -04:00
parent 9068efd270
commit b5e96f2810

48
staffmsg.md Normal file

@@ -0,0 +1,48 @@
# StaffMsg Cog
The StaffMsg cog is a secure and professional communication tool for server administrators and authorized staff. It provides a permission-controlled command for sending official Direct Messages (DMs) to server members, complete with an accountability log.
---
## 1. Features
- **Permission Controlled:** Access to the command is restricted to a specific, configurable role, ensuring only authorized staff can send official messages.
- **Form-Based Interface:** Uses a Discord Modal (pop-up form) for message composition, ensuring all DMs are sent in a consistent and professional format.
- **Accountability Log:** Automatically sends a copy of every sent DM to a private log channel, creating a crucial audit trail for staff actions.
- **DataManager Integration:** Logs a timestamp for every sent message, making it fully compatible with the `DataManager` cog for automatic data purging.
- **Hybrid Command:** The command works with both slash commands (`/smsg`) and your bot's prefix (`[p]smsg`).
---
## 2. Staff Workflow
1. A staff member with the authorized role runs the `/smsg <user>` command, optionally including a message.
2. If no message is included, the bot presents the staff member with a "Staff Message" pop-up form.
3. The staff member composes the message in the form and submits it.
4. The bot sends the message to the target user's DMs as a clean, professional embed.
5. Simultaneously, the bot sends a copy of the embed to the configured log channel, noting which staff member sent it and who it was sent to.
---
## 3. Admin Commands
### `/smsg <user> [message]`
Sends an official DM to a server member.
- **`user`**: The server member to send the message to.
- **`[message]`**: An optional message to send. If not provided, the composition form will open.
**Prefix Version:** `[p]smsg <user> [message]`
**Aliases:** `/staff`, `/staffmsg`
### `/staffmsgset`
The main command group for configuring the StaffMsg system. Requires `Manage Server` permissions.
**Prefix Version:** `[p]staffmsgset`
- `/staffmsgset role <@role>`
- Sets the role that is authorized to use the `/smsg` command.
- `/staffmsgset logchannel <#channel>`
- Sets the private channel where copies of all sent DMs will be logged.