-
-
Notifications
You must be signed in to change notification settings - Fork 4
How to use the Guilded4J debugger
This page is outdated. G4JDebugger still exists but has been moved out of the 'main' code directory. You need some other ways to launch it.
I'll update this page sooner or later.
Guilded4J now has a built-in debugger(aka G4JDebugger). It looks like an interactive console chat interface using Linux commands. You can launch the debugger by using a shell command like this:
java -cp guilded4j-1.0-SNAPSHOT-jar-with-dependencies.jar vip.floatationdevice.guilded4j.G4JDebugger
If this is the first run it will ask you to enter your API token.
After that the debugger will attempt to open socket connection to Guilded. If no problems it will print 'logged in' and now you can use the G4JDebugger command line.
- G4JDebugger will save your token and last used channel UUID to an unencrypted file called 'G4JSession.dat' under your shell's workdir. It is used to quickly restore login information at the next debugger launch. Please keep this file safe. If you no longer need it, please delete it at the first opportunity.
Before doing most of operations you may need to specify a target channel UUID. Copy it from Guilded client and use cd <UUID>
to change the target UUID.
Incoming text messages will automatically printed to console in this format:[TIME] [CHANNEL ID] (MESSAGE ID) <USER ID> CONTENT
To send a text message you need to specify a text channel and type send <CONTENT>
.
Guilded API uses Websocket to send you events and you send HTTP requests to do any operations so disconnecting from websocket will only prevent you from receiving any events(such as receiving messages) without preventing you from sending actions to the Guilded server.
Usage: disconnect
G4JDebugger can perform most of the operations that Guilded4J implements. Type help
to see the G4JDebugger command list: