An open API service indexing awesome lists of open source software.

https://github.com/brys0/kyro

A basic music bot with easy to addon modules
https://github.com/brys0/kyro

Last synced: 6 months ago
JSON representation

A basic music bot with easy to addon modules

Awesome Lists containing this project

README

          

# Kyro
### A simple music bot written in Kotlin
![Logo](https://i.imgur.com/dPa428Q.gif)
> Note: This is entirely open source and is in **no case** under any sort of warranty and special service

### Where is the code?

Each of the code commits are seperated by version you can find the code by clicking the **top branch** and selecting the different version based on what your needs are.

Adding Your OWN Commands

### Whats the structure?

```java
class : Command()
{
override fun execute(event: CommandEvent)
{
// Example defines
val channel = event.channel
val message = event.message

// Your other code here

}
init {
name = "" // String
aliases = arrayOf("" ,"") // Array String
help = "" // String
guildOnly = // true (Command can only be used in guild) / false (Command can be used in private messaging and guild)
arguments = getArguments()
cooldown = // 1 2 3
requiredRole = "" // String
}
}
```
### Example

```java
class Skip : Command() {

override fun execute(event: CommandEvent) {
val channel = event.textChannel
val playerManager = instance
val GMM = playerManager!!.getGuildMusicManager(event.guild)
val s = GMM.scheduler
val player = GMM.audioPlayer

s.isRepeating = true
if (event.guild.roles.stream().noneMatch{r: Role -> r.name.equals("DJ", ignoreCase = true)}) {
event.reply("Seems like a DJ role didn't exist so i've created one for you.")
event.guild.createRole().setName("DJ").setColor(Color.CYAN).queue()
}
if (event.member.roles.stream().noneMatch { r: Role -> r.name.equals("DJ", ignoreCase = true) or !event.isOwner or !event.member.hasPermission(Permission.ADMINISTRATOR) }) {
event.textChannel.sendMessage("You need the role `DJ` for that!").queue()
return

}
if (player.playingTrack == null) {
channel.sendMessage("Can't skip when no track is playing!").queue()
return
}
s.nextTrack()
channel.sendMessage("Skipped.").queue()

} init {
name = "skip"
aliases = arrayOf("s")
help = "Skips the currently playing track"
}
}
```

# Q & A

### Q: Who's the command handler your using made by?
Great question! The command handler is made by [@jagrosh](https://github.com/jagrosh) and the package is [JDA-Utilities](https://github.com/JDA-Applications/JDA-Utilities)

### Q: What are the rules for submitting pull requests?
The rules for submitting a pull request are the following:

> You must have at least 50 lines changed

> You must have changed something other than grammatical errors (i.e Fixing documentation)

That's it for now :3