Hi Guys,
Just want to share with you'll my Discord Bot with both sides communication.
It uses auxservice to send messages to the Discord client, and to receive from the client.
The code is not fully commented, but it should be easy to use. The Bot Client was made using Node.JS, so you must install npm and node to run.
Instructions:
* Install NPM and Node;
* Run command "npm install" inside bot client folder.
* Edit the config.js file with your tokens, shard IP, etc.
* There is some particularity functions/methods from my shard, like who.getName(), you must update it.
* Get the archives from bash_from_POL_folder and put in pol folder. Give it permissions to run: chmod +x+u archivename
* Commands like !update and !poweron was made for POL running in a linux environment. You must update for .bat if you want to use with windows.
* start bot with node index.
* Edit auxsvc_control.src to include commands or remove.
* use start_script(":auxsvc:auxsvc_message", struct{ message := "my message" }); to send a message to General channel.
* use start_script(":auxsvc:auxsvc_message", struct{ key := "LogMessage", message := msg }); to send a message to Log Channel.
Cmd list:
Users
* !ping
* !who
Administrator (permission ADMINISTRATOR)
* !poweron - start POL
* !shutdown - Send command to shutdown POL
* !register acc pswd email
* !update - update shard scripts and output stderr and stdout to Discord
* !cpu - get machine cpu usage.
Discord Bot with Server and Client communication
Moderator: POL Developer
Discord Bot with Server and Client communication
- Attachments
-
- auxsvc.zip
- (2.96 KiB) Downloaded 288 times
-
- discordBot-dist.zip
- (27.5 KiB) Downloaded 290 times
Re: Discord Bot with Server and Client communication
Wow!
Duttones, really great work!
Duttones, really great work!
Re: Discord Bot with Server and Client communication
Thanks,
I made these commands to help the staff in charge of my shard to continue the development. Hope this helps the POL community too.
I can give assistance to anyone who needs here.
I made these commands to help the staff in charge of my shard to continue the development. Hope this helps the POL community too.
I can give assistance to anyone who needs here.
Re: Discord Bot with Server and Client communication
Thank you Duttones.
Hmm... this looks vaguely familiar... I think I have seen a similar implementation somewhere.
Hmm... this looks vaguely familiar... I think I have seen a similar implementation somewhere.