Merge branch 'master' into 'stable'

fix: fixed issues with the "is in vc" check

See merge request limited_dev/botendo!1
This commit is contained in:
limited_dev 2023-04-19 19:27:44 +00:00
commit 630bea56df
6 changed files with 18 additions and 8 deletions

View file

@ -15,13 +15,19 @@ A Discord music bot, written in Kotlin using the kord library.
<img src="https://img.shields.io/badge/limited__dev-Owner%20%26%20Developer-blue" alt="limited_dev: Owner & Developer"/>
</div>
## Special Thanks to
- HopeBaron for taking the time to help me fix this pos.
## Commands
- info -- Show basic infos about the bot
- play -- Play a song
- stop -- Stop playing a song and leave the vc
## How to self-host
## How to self-host (using the Docker container)
## How to self-host (using the JAR)
1. Download the latest release from the Package Registry ("Packages and registries" > "Package Registry")
1. It should be called something like this: "Botendo-X.X.X-xxxxxxxx-prod.jar" (replace "X.X.X" with the latest
@ -31,7 +37,7 @@ A Discord music bot, written in Kotlin using the kord library.
2. Place it anywhere you want.
3. Run the following command:
> java -jar Botendo-X.X.X-xxxxxxxx-prod.jar
4. The bot should start and create a config file named "credentials.nils"
4. The bot should start and create a config file named "credentials.nils" in a folder called "data"
5. Open it and put in your credentials.
1. token: your Discord bot token
2. lavaip: the IP of your LavaLink instance e.g.: ("ws://192.168.178.1:2333")

View file

@ -33,7 +33,7 @@ val ownerID = 372703841151614976L
group = "de.limited_dev.botendo"
version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_SHORT_SHA")}-prod" }
?: System.getenv("CI_COMMIT_SHORT_SHA")?.let { "$it-dev" }
?: "6.1.0"
?: "6.1.1"
val kordver = "1.5.6"
val lavaver = "3.8.0"

View file

@ -38,7 +38,7 @@ class NowPlayingExt : Extension() {
val guildId = this.guild!!.id
val link = Bot.lava.getLink(guildId)
val player = link.player
if (link.state != Link.State.CONNECTED) {
if (link.state == Link.State.NOT_CONNECTED) {
MessageUtil.sendEmbedForPublicSlashCommand(
this,
"Not connected",
@ -58,7 +58,11 @@ class NowPlayingExt : Extension() {
MessageUtil.sendEmbedForPublicSlashCommandWithImage(
this,
"Currently playing",
"**${track.title}**\n*Now Playing*\nby ${track.author} :: ${
"**${track.title}**\n*Now Playing*\nby ${track.author} :${
TimeUtil.getTimeFormatedRaw(
track.position.inWholeMilliseconds
)
}: ${
TimeUtil.getTimeFormatedRaw(
track.length.inWholeMilliseconds
)

View file

@ -37,7 +37,7 @@ class QueueExt : Extension() {
val guildId = this.guild!!.id
val link = Bot.lava.getLink(guildId.toString())
val player = link.player
if (link.state != Link.State.CONNECTED) {
if (link.state == Link.State.NOT_CONNECTED) {
MessageUtil.sendEmbedForPublicSlashCommand(
this,
"Not connected",

View file

@ -50,7 +50,7 @@ class SkipExt : Extension() {
}
val channelId = voiceState.channelId
if (link.state != Link.State.CONNECTED) {
if (link.state == Link.State.NOT_CONNECTED) {
MessageUtil.sendEmbedForPublicSlashCommand(
this,
"Not connected",

View file

@ -52,7 +52,7 @@ class StopExt : Extension() {
return@action
}
val channelId = vcsUser.channelId
if (link.state != Link.State.CONNECTED) {
if (link.state == Link.State.NOT_CONNECTED) {
this.respond {
this.embeds.add(
MessageUtil.getEmbed(