Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
quick fix with voice state (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealYusufIsmail authored Sep 6, 2023
1 parent d2846ef commit fe01a03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![codecov](https://codecov.io/gh/YDWK/YDWK/branch/master/graph/badge.svg?token=LKIA8T6N6J)](https://codecov.io/gh/YDWK/YDWK)
[![yde](https://img.shields.io/badge/YDE--Version-v1.1.5-blue)](https://github.com/YDWK/YDE/releases/tag/v1.1.5)
[![yde](https://img.shields.io/badge/YDE--Version-v1.2.0-blue)](https://github.com/YDWK/YDE/releases/tag/v1.2.0)

# YDE

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kotlin.code.style=official
version= 1.1.5
version= 1.2.0

jvmVersion = 1.9.0
pluginAllOpenVersion = 1.9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ class VoiceStateImpl(

override val channel: GuildVoiceChannel?
get() =
if (yde.getGuildChannelGetterById(json["channel_id"].asText()) != null)
yde.getGuildChannelGetterById(json["channel_id"].asText())!!.asGuildVoiceChannel()
else null
if (json.has("channel_id")) {
if (yde.getGuildChannelGetterById(json["channel_id"].asText()) != null)
yde.getGuildChannelGetterById(json["channel_id"].asText())!!
.asGuildVoiceChannel()
else null
} else null

override val user: User
get() =
Expand Down

0 comments on commit fe01a03

Please sign in to comment.