Wechaty is used in many ChatBot projects by thousands of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code java wechaty, join our Wechaty Java Developers’ Home.
Scan now, because other Wechaty Java developers want to talk with you too! (secret code: java wechaty)
The World’s Shortest Java ChatBot: 6 lines of Code
class Bot{
public static void main(String args[]){
Wechaty bot = Wechaty.instance()
.use(
WechatyPlugins.ScanPlugin(),
WechatyPlugins.DingDongPlugin(null))
.start(true);
}
}
Development
To be writen:
make install
make bot
Java Wechaty Developing Plan
We already have Wechaty in TypeScript, It will be not too hard to translate the TypeScript(TS) to Java because wechaty has only 3,000 lines of the TS code, they are well designed and de-coupled by the wechaty-puppet abstraction. So after we have translated those 3,000 lines of TypeScript code, we will almost be done.
As we have already a ecosystem of Wechaty in TypeScript, so we will not have to implement everything in Java, especially, in the Feb 2020, we have finished the @chatie/grpc service abstracting module with the wechaty-puppet-hostie implmentation.
The following diagram shows out that we can reuse almost everything in TypeScript, and what we need to do is only the block located at the top right of the diagram: Wechaty (Java).
If you are interested in the translation and want to look at how it works, it will be a good start from reading and comparing those two Image class files in TypeScript and Java at the same time.
java-wechaty
Connecting Chatbots
Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 6 lines of Java.
Voice of the Developers
See more at Wiki:Voice Of Developer
Join Us
Wechaty is used in many ChatBot projects by thousands of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code java wechaty, join our Wechaty Java Developers’ Home.
Scan now, because other Wechaty Java developers want to talk with you too! (secret code: java wechaty)
The World’s Shortest Java ChatBot: 6 lines of Code
if use plugins
Development
To be writen:
Java Wechaty Developing Plan
We already have Wechaty in TypeScript, It will be not too hard to translate the TypeScript(TS) to Java because wechaty has only 3,000 lines of the TS code, they are well designed and de-coupled by the wechaty-puppet abstraction. So after we have translated those 3,000 lines of TypeScript code, we will almost be done.
As we have already a ecosystem of Wechaty in TypeScript, so we will not have to implement everything in Java, especially, in the Feb 2020, we have finished the @chatie/grpc service abstracting module with the wechaty-puppet-hostie implmentation.
The following diagram shows out that we can reuse almost everything in TypeScript, and what we need to do is only the block located at the top right of the diagram:
Wechaty (Java).Example: How to Translate TypeScript to Java
There’s a 100 lines class named
Imagein charge of downloading the WeChat image to different sizes.It is a great example for demonstrating how do we translate the TypeScript to Java in Wechaty Way:
Image Class Source Code
If you are interested in the translation and want to look at how it works, it will be a good start from reading and comparing those two
Imageclass files in TypeScript and Java at the same time.To-do List
Wechaty Internal Modules
Wechaty External Modules
Usage
Add a token to class
io.github.wechaty.example.Mainin folderexamples/src/main/javaBuild:
Run
enjoy
Requirements
Install
Links
History
master
v0.4 (Jun 19, 2020)
Java(Kotlin) Wechaty BETA Released!
Read more from our Multi-language Wechaty Beta Release event from our blog:
v0.1.4 (June 13 2020)
PuppetManagerto manage multi puppet implementations.v0.1.3 (June 6 2020)
v0.1.2 (June 6 2020)
on(Event:String,Listener:listener)toonEvent(Listener:listener). See examplesv0.1.1 (May 31 2020)
v0.1 (May 18 2020)
We decided to use Kotlin to develop the Java Wechaty!
wechaty/java-wechatybydiaozxin/kotlin-wechaty.v0.0.1 (Mar 12, 2020)
Related Projects
Stargazers over time
Badge
Contributors
Committers
Creator
Copyright & License