discord-moodle-bot
discord-moodle-bot copied to clipboard
Send Data to own Server
Hey, i am currently on my mission to integrate this project into one of mine.
I want to send the Data of the discord message / assignment etc. to my own server / webhook. Is there any way to send the Data to my own source or endpoint?? Or where do i get the data in the files / where is it sent to discord?
Thank you any help would be much appreciated :)
Hi, currently a "webhook like" connector is not implemented. But you can start to implement your own by implementing the ConnectorPlugin class (https://github.com/tjarbo/discord-moodle-bot/blob/version-2/packages/backend/src/controllers/connectors/plugins/connectorPlugin.class.ts). Use the discordConnector as an example. Also, you need to add it here. Finally, you need to update the ConnectorService to support your new plugin. Look for switch-case statements, where currently only "Discord" is handled and add your new plugin. But this is only the backend part, which does not cover the frontend yet. But you should be able to configure a instance of your new connection through the database.
Unfortunately, this is the only support I can provide you, as it is already a long time ago since my last update on this project and I cannot remember all the details. But I already tried to implement an interface/system to easily add new connectors :)
Best regards
Thank you i will definitely try that and huge thanks for the fast response! Still a great project, using it for years now!
My pleasure :) Nice the hear that even after that long time the project is still in use :D
Do not hesitate to create and maintain your own fork of the project. There are many dependencies that should be updated and also so many feature tickets in the backlog (and now with your use case/idea a new one ;) ). I will put a "Not under maintenance" banner probably in the near feature at the top of the readme and I guess it would be great if there are other actively maintained alternatives available :)
Hm yes i can make a fork if i actually maintain it but i have school and stuff so maybe later on this year. ~How do you create a user in the new version btw? I used the old version the entire time until like last week.~ -> Just found it sorry i didn't follow your Documentation ;)
I now get this error:
When i debug it, the console this:
The network tab actually shows that the request was successful. Why does it give me that error then?
The user is created but no login is possible. the user is not found when trying to login:
The database entry:
On login:
The Error is that the Device value of the user is "null", how can i fix that? What are possible values for the device value of an user?