Initial commit
This commit is contained in:
98
README.md
Normal file
98
README.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# TempVoice (Red-DiscordBot Cog)
|
||||
|
||||
Join-to-create temporary voice channels for Red-DiscordBot.
|
||||
|
||||
## Features
|
||||
|
||||
- Per-guild configuration (no hardcoded global channel IDs)
|
||||
- Auto-create temporary voice channel when user joins a configured start channel
|
||||
- Auto-move user to their own temporary channel
|
||||
- Reuse existing temporary channel for the same owner if it still exists
|
||||
- Auto-delete temporary channel when it becomes empty
|
||||
- Owner command to set channel user limit (`0-99`)
|
||||
- Admin commands for setup and cleanup
|
||||
- i18n-ready runtime messages (English + Polish translation file)
|
||||
|
||||
## Requirements
|
||||
|
||||
- Red-DiscordBot `>= 3.5.0`
|
||||
- Python `>= 3.8`
|
||||
|
||||
## Install
|
||||
|
||||
1. Put this cog folder in your custom cogs path.
|
||||
2. In Discord:
|
||||
|
||||
```text
|
||||
[p]load tempvoice
|
||||
```
|
||||
|
||||
## Initial Setup (per server)
|
||||
|
||||
Use these commands on each guild:
|
||||
|
||||
```text
|
||||
[p]tempvoice setstart <voice_channel>
|
||||
[p]tempvoice setcategory <category>
|
||||
```
|
||||
|
||||
Check settings:
|
||||
|
||||
```text
|
||||
[p]tempvoice settings
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
### Admin (`manage_guild` or admin)
|
||||
|
||||
- `[p]tempvoice settings` - show config and current state
|
||||
- `[p]tempvoice setstart <voice_channel>` - set join-to-create channel
|
||||
- `[p]tempvoice setcategory <category>` - set target category for temp channels
|
||||
- `[p]tempvoice cleanup` - remove stale mappings and delete empty temp channels
|
||||
|
||||
### User (channel owner)
|
||||
|
||||
- `[p]tempvoice setlimit <0-99>` - set user limit on your own temp channel
|
||||
- `[p]setlimit <0-99>` - hidden backward-compatible alias
|
||||
|
||||
## How It Works
|
||||
|
||||
1. User joins the configured start voice channel.
|
||||
2. Cog creates (or reuses) an owner-mapped temporary voice channel in configured category.
|
||||
3. User is moved to that channel.
|
||||
4. When temporary channel is empty, it is deleted automatically.
|
||||
|
||||
## Data Stored
|
||||
|
||||
Per guild:
|
||||
|
||||
- `start_channel_id`
|
||||
- `target_category_id`
|
||||
- `channel_owners` (mapping: temporary channel ID -> owner user ID)
|
||||
- `schema_version`
|
||||
|
||||
## Localization
|
||||
|
||||
- Runtime messages are localized via Red i18n.
|
||||
- Included translation file: `locales/pl-PL.po`.
|
||||
- Fallback language is English.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- If setup commands succeed but still print command errors, check bot logs and reload cog:
|
||||
|
||||
```text
|
||||
[p]reload tempvoice
|
||||
```
|
||||
|
||||
- Ensure bot has:
|
||||
- Guild permission: `Move Members`
|
||||
- Category/channel permissions: `View Channel`, `Connect`, `Manage Channels`
|
||||
|
||||
- If state looks inconsistent:
|
||||
|
||||
```text
|
||||
[p]tempvoice cleanup
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user