kiranhart / Auction-House

Auction House is a complete auction system for your server.
20 stars 22 forks source link

It seems that the webhook does not support utf8 or Unicode item names. #15

Closed Cheubajjang closed 1 year ago

Cheubajjang commented 2 years ago

Describe the bug Sorry for the bad translation. When I using discord webhook, it doesn't seem to work with utf8, unicode like Korean item names.

To Reproduce

command '/ah sell' an item with a Korean name, prompt said:

[09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: java.io.IOException: Server returned HTTP response code: 400 for URL: https://discord.com/api/webhooks/(my webhook links) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1997) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.api.DiscordWebhook.execute(DiscordWebhook.java:148) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.api.AuctionAPI.sendDiscordMessage(AuctionAPI.java:299) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.listeners.AuctionListeners.lambda$null$0(AuctionListeners.java:35) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.listeners.AuctionListeners.lambda$onAuctionStart$1(AuctionListeners.java:34) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.lib.taskchain.TaskChainTasks$GenericTask.run(TaskChainTasks.java:83) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.lib.taskchain.TaskChain$TaskHolder.run(TaskChain.java:1312) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.lib.taskchain.TaskChain$TaskHolder.access$100(TaskChain.java:1266) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at Auction House.jar//ca.tweetzy.auctionhouse.lib.taskchain.TaskChain.lambda$nextTask$18(TaskChain.java:1187) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [09:36:46] [TaskChainAsyncQueue Thread 1/WARN]: at java.base/java.lang.Thread.run(Thread.java:833)

and does not appear on the discord message. In the case of config, it can be solved by converting it into Unicode like '\ud14c\uc2a4\ud2b8', but I can't think of a way to solve the in-game name. Thank you for reading it. I hope there is a way.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots issue Like this screenshot, config issues can solve with unicode convert. But…... '/ah sell' command can't appear with korean item name. issue2 but uh, unicode form execute well.

Server Information (please complete the following information):

Additional context

kiranhart commented 1 year ago

Resolved in latest patch