File tree 2 files changed +6
-5
lines changed
kotlin/org/kraftwerk28/spigot_tg_bridge
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,9 @@ class TgBot(
103
103
update.message?.text?.let {
104
104
commandRegex.matchEntire(it)?.groupValues?.let {
105
105
commandMap[it[1 ]]?.let { it(update) }
106
+ } ? : run {
107
+ onTextHandler(update)
106
108
}
107
- } ? : run {
108
- onTextHandler(update)
109
109
}
110
110
}
111
111
@@ -185,9 +185,10 @@ class TgBot(
185
185
}
186
186
187
187
private suspend fun onTextHandler (update : TgApiService .Update ) {
188
- if (! config.logFromTGtoMC) return
189
188
val msg = update.message!!
190
- plugin.sendMessageToMinecraft(msg.text!! , msg.from!! .rawUserMention())
189
+ if (! config.logFromTGtoMC || msg.from == null )
190
+ return
191
+ plugin.sendMessageToMinecraft(msg.text!! , msg.from.rawUserMention())
191
192
}
192
193
193
194
private fun formatMsgFromMinecraft (
Original file line number Diff line number Diff line change 1
1
name : SpigotTGBridge
2
- version : " 0.16 "
2
+ version : " 0.17 "
3
3
api-version : " 1.15"
4
4
main : org.kraftwerk28.spigot_tg_bridge.Plugin
5
5
description : Telegram <-> Minecraft communication plugin for Spigot.
You can’t perform that action at this time.
0 commit comments