Blueforcer Well-Known Member Licensed User Longtime User Jun 30, 2020 #1 Hello, is there any documentation of the JDA lib? There are so many functions, but dont know how to use them. For example how can i response to a message or how can i send pictures etc. thanks
Hello, is there any documentation of the JDA lib? There are so many functions, but dont know how to use them. For example how can i response to a message or how can i send pictures etc. thanks
Erel B4X founder Staff member Licensed User Longtime User Jun 30, 2020 #2 Moved to the questions forum. You should never post questions in the libraries forum. Upvote 0
DonManfred Expert Licensed User Longtime User Jun 30, 2020 #3 Blueforcer said: is there any documentation of the JDA lib? Click to expand... Not really. You can download the java sources from github or the release build jars JDA [Jenkins] ci.dv8tion.net Inside the javadoc is a lot of info. Note that the Docs are for the JAVA Part. Blueforcer said: how can i send pictures Click to expand... B4X: Copy Dim topin As Message = channel.sendFile5(imagebytes,"Teilnehmer.jpg") ' Channel is a MessageChannel Blueforcer said: For example how can i response to a message Click to expand... If the bot gets a private message then the Channel in MessageReceived is of Type private. You just can respond in this channel. B4X: Copy Sub JDA_onMessageReceived(event As Object) MyLog($"JDA_onMessageReceived(${event})"$) Dim ev As MessageReceivedEvent = event Dim msg As Message = ev.Message Dim ch As MessageChannel = msg.Channel work with ch to respond in the same channel end sub If the bot reads the message in public then you can for ex answer in the channel you get a message in. Last edited: Jun 30, 2020 Upvote 0
Blueforcer said: is there any documentation of the JDA lib? Click to expand... Not really. You can download the java sources from github or the release build jars JDA [Jenkins] ci.dv8tion.net Inside the javadoc is a lot of info. Note that the Docs are for the JAVA Part. Blueforcer said: how can i send pictures Click to expand... B4X: Copy Dim topin As Message = channel.sendFile5(imagebytes,"Teilnehmer.jpg") ' Channel is a MessageChannel Blueforcer said: For example how can i response to a message Click to expand... If the bot gets a private message then the Channel in MessageReceived is of Type private. You just can respond in this channel. B4X: Copy Sub JDA_onMessageReceived(event As Object) MyLog($"JDA_onMessageReceived(${event})"$) Dim ev As MessageReceivedEvent = event Dim msg As Message = ev.Message Dim ch As MessageChannel = msg.Channel work with ch to respond in the same channel end sub If the bot reads the message in public then you can for ex answer in the channel you get a message in.