Closed PystoyPlayer closed 5 months ago
I set it up tho
ok so I replaced default config with the one from your GitHub and it's working now but giving some strange errors in console
tbreload
[21:23:44 ERROR]: [TelegramBridge] Error loading config: For input string: "null"
[21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
[21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.Integer.parseInt(Integer.java:668)
[21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.Integer.valueOf(Integer.java:999)
[21:23:44 ERROR]: [TelegramBridge] TelegramBridge-2.1.2.jar//org.altart.telegrambridge.config.Config$Chat.chatsFrom(Config.java:162)
[21:23:44 ERROR]: [TelegramBridge] TelegramBridge-2.1.2.jar//org.altart.telegrambridge.config.Config.load(Config.java:56)
[21:23:44 ERROR]: [TelegramBridge] TelegramBridge-2.1.2.jar//org.altart.telegrambridge.commands.ReloadCommand.onCommand(ReloadCommand.java:13)
[21:23:44 ERROR]: [TelegramBridge] org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[21:23:44 ERROR]: [TelegramBridge] org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
[21:23:44 ERROR]: [TelegramBridge] org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:1001)
[21:23:44 ERROR]: [TelegramBridge] org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchServerCommand(CraftServer.java:986)
[21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.dedicated.DedicatedServer.bf(DedicatedServer.java:540)
[21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:487)
[21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1420)
[21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1191)
[21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322)
[21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.Thread.run(Thread.java:840)
[21:23:44 INFO]: Config reloaded!
also when a user has an invisible name:
[21:59:00 INFO]: [TelegramBridge] Telegram message received from suhddude: это я
это я
я скринил😊☺️
[22:00:46 INFO]: [TelegramBridge] Telegram message received from null: гсоподи
[22:00:46 ERROR]: [org.telegram.telegrambots.updatesreceivers.DefaultBotSession] Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null
at java.lang.String.replace(String.java:2961) ~[?:?]
at org.altart.telegrambridge.utils.Format.string(Format.java:13) ~[TelegramBridge-2.1.2.jar:?]
at org.altart.telegrambridge.bot.feature.MessageListener.onUpdateReceived(MessageListener.java:83) ~[TelegramBridge-2.1.2.jar:?]
at org.altart.telegrambridge.bot.TelegramBot.lambda$onUpdateReceived$1(TelegramBot.java:83) ~[TelegramBridge-2.1.2.jar:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:?]
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:686) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[?:?]
at org.altart.telegrambridge.bot.TelegramBot.onUpdateReceived(TelegramBot.java:83) ~[TelegramBridge-2.1.2.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.telegram.telegrambots.meta.generics.LongPollingBot.onUpdatesReceived(LongPollingBot.java:27) ~[TelegramBridge-2.1.2.jar:?]
at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$HandlerThread.run(DefaultBotSession.java:312) ~[TelegramBridge-2.1.2.jar:?]
how a user can have an invisible name?
ok so I replaced default config with the one from your GitHub and it's working now but giving some strange errors in console
tbreload [21:23:44 ERROR]: [TelegramBridge] Error loading config: For input string: "null" [21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) [21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.Integer.parseInt(Integer.java:668) [21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.Integer.valueOf(Integer.java:999) [21:23:44 ERROR]: [TelegramBridge] TelegramBridge-2.1.2.jar//org.altart.telegrambridge.config.Config$Chat.chatsFrom(Config.java:162) [21:23:44 ERROR]: [TelegramBridge] TelegramBridge-2.1.2.jar//org.altart.telegrambridge.config.Config.load(Config.java:56) [21:23:44 ERROR]: [TelegramBridge] TelegramBridge-2.1.2.jar//org.altart.telegrambridge.commands.ReloadCommand.onCommand(ReloadCommand.java:13) [21:23:44 ERROR]: [TelegramBridge] org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [21:23:44 ERROR]: [TelegramBridge] org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) [21:23:44 ERROR]: [TelegramBridge] org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:1001) [21:23:44 ERROR]: [TelegramBridge] org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchServerCommand(CraftServer.java:986) [21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.dedicated.DedicatedServer.bf(DedicatedServer.java:540) [21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:487) [21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1420) [21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1191) [21:23:44 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322) [21:23:44 ERROR]: [TelegramBridge] java.base/java.lang.Thread.run(Thread.java:840) [21:23:44 INFO]: Config reloaded!
Hmm… I know what this is, I thought this wouldn't be a problem I will resolve this.
how a user can have an invisible name?
idk, I believe they use some special characters. Telegram doesn't show them either
how a user can have an invisible name?
idk, I believe they use some special characters. Telegram doesn't show them either
ahh I understood although nicknames can be invisible with some special characters, you don't rely on Nicknames but on @ usernames which can be toggled off
Example:
Both users have invisible nicknames but one of them has also disabled his username
@PystoyPlayer my telegram doesn't have option to disable my @ username I will add some fallbacks but maybe could be something wrong
Are you sure ?
[21:19:29 INFO]: [TelegramBridge] Enabling TelegramBridge v2.1.3
[21:19:29 ERROR]: [TelegramBridge] Error loading config: class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap')
[21:19:29 ERROR]: [TelegramBridge] TelegramBridge-2.1.3.jar//org.altart.telegrambridge.config.Config$Chat.chatsFrom(Config.java:159)
[21:19:29 ERROR]: [TelegramBridge] TelegramBridge-2.1.3.jar//org.altart.telegrambridge.config.Config.load(Config.java:56)
[21:19:29 ERROR]: [TelegramBridge] TelegramBridge-2.1.3.jar//org.altart.telegrambridge.config.Config.<init>(Config.java:40)
[21:19:29 ERROR]: [TelegramBridge] TelegramBridge-2.1.3.jar//org.altart.telegrambridge.TelegramBridge.onEnable(TelegramBridge.java:35)
[21:19:29 ERROR]: [TelegramBridge] org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[21:19:29 ERROR]: [TelegramBridge] io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189)
[21:19:29 ERROR]: [TelegramBridge] io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[21:19:29 ERROR]: [TelegramBridge] org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[21:19:29 ERROR]: [TelegramBridge] org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:656)
[21:19:29 ERROR]: [TelegramBridge] org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:567)
[21:19:29 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:640)
[21:19:29 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:439)
[21:19:29 ERROR]: [TelegramBridge] net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:345)
[21:19:29 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1116)
[21:19:29 ERROR]: [TelegramBridge] net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322)
[21:19:29 ERROR]: [TelegramBridge] java.base/java.lang.Thread.run(Thread.java:840)
[21:19:29 ERROR]: [TelegramBridge] Please set your bot token and chat id in the config file
[21:19:29 INFO]: [TelegramBridge] Disabling TelegramBridge v2.1.3
default config is still wrong
What you are seeing is the default yes, I made some changes to make the default configuration not be necessary
ok so I just put token and id in ' ' and it worked
On documentation you can see the fields, I will clarify this in the docs
btw why pinned message is in config, not in lang folder ?
Once you put the chat id and bot token it will work
But the fields that is not set will be the default
Once you put the chat id and bot token it will work
yeah but it's quite inconvenient that I need to search for the fields that I may add to the config by myself. Idk maybe not
btw why pinned message is in config, not in lang folder ?
Because it depends more of the server and what customization the server owner will like to have, the telegram pinned message will be the same for everyone anyway
Because it depends more of the server and what customization the server owner will like to have, the telegram pinned message will be the same for everyone anyway
understandable
Once you put the chat id and bot token it will work
yeah but it's quite inconvenient that I need to search for the fields that I may add to the config by myself. Idk maybe not
I know this can be strange, I am doing this because can be quite a mess to manage those config files, and I want the user to not have to think too much about this