Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Data to own Server #262

Open
FreshImmuc opened this issue Oct 5, 2023 · 7 comments
Open

Send Data to own Server #262

FreshImmuc opened this issue Oct 5, 2023 · 7 comments

Comments

@FreshImmuc
Copy link

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 :)

@tjarbo
Copy link
Owner

tjarbo commented Oct 5, 2023

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

@FreshImmuc
Copy link
Author

Thank you i will definitely try that and huge thanks for the fast response! Still a great project, using it for years now!

@tjarbo
Copy link
Owner

tjarbo commented Oct 5, 2023

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 :)

@FreshImmuc
Copy link
Author

FreshImmuc commented Oct 6, 2023

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 ;)

@FreshImmuc
Copy link
Author

I now get this error:
image
When i debug it, the console this:
image
The network tab actually shows that the request was successful. Why does it give me that error then?
image

@FreshImmuc
Copy link
Author

The user is created but no login is possible. the user is not found when trying to login:

The database entry:
image
On login:
image
image

@FreshImmuc
Copy link
Author

FreshImmuc commented Oct 6, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants