[Feature Request] Aliases with custom arguments
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Not a huge issue, but remembering and typing out commands takes a long time. Especially during streams we need to stop playing the game...reconfigure all the music...then start playing again.
**Describe the solution you'd like**
I would absolutely love custom aliases! They would be short little custom commands that execute one (or more) longer commands. For example, our server has this running joke about John Cena. It would be awesome to alias the command `!cena` to execute the following:
1. `!stop`
2. `!volume 100`
3. `!play https://www.youtube.com/watch?v=blIjjwVgUmE`
This would stop the current playlist, pump the volume and play the 🔥 theme song!
Here are some other custom alias ideas...
`!battle`, stop current music, set high volume, play [battle music](https://www.youtube.com/watch?v=i649odAK7-M)!
```
battle = ["stop", "volume 100", "play https://www.youtube.com/watch?v=i649odAK7-M"]
```
`!levelup`, stop current playlist, set high volume, play [level up sound](https://www.youtube.com/watch?v=8URukvnUYTw), set medium volume, play playlist.
```
levelup = ["stop","volume 100","play https://www.youtube.com/watch?v=8URukvnUYTw", "volume 50", "play playlist chilling"]
```
`!tavern`, stop current music, set medium volume, play [atmospheric tavern music](https://www.youtube.com/watch?v=fIuO3RpMvHg)
```
tavern = ["stop", "volume 50", "play https://www.youtube.com/watch?v=fIuO3RpMvHg"]
```
**Describe the basic flow/steps of using this feature**
How this feature would be used:
The MusicBot admin would setup these custom aliases in `config.txt`. The would live in the same `aliases` object with the existing aliases. Each array contains the list of commands to execute in quotes `""`, for example:
```
aliases {
...
// Custom Commands
cena = [ "stop", "volume 100", "!play https://www.youtube.com/watch?v=blIjjwVgUmE" ]
}
```
Just like standard commands, anyone with the DJ permissions could use them. They use the same prefix `!`. After typing the custom command `!custom` the aliased commands are executed in order by as though they had been typed out manually.
**Additional context**
Nope
**Have you confirmed that this idea is not already described here?**
https://github.com/jagrosh/MusicBot/projects/1
Yes I searched for custom "alias" and didn't see any related cards.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with config.txt and the existing aliases object, then trace how standard aliases are parsed and how commands are checked against DJ permissions. Define how an alias's ordered command list is dispatched, including arguments and the command prefix. Done means custom aliases can be configured and execute each listed command in order with the same permissions as standard commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100