Discord integration question.

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
Dovaskus
Posts: 3
Joined: 08 Jun 2018, 15:52

Discord integration question.

Post by Dovaskus »

Hi,

We are planning to use mantisBT for our gaming community to assist with tracking tickets for server outages and general issues with anything we are running for them.

We have a community of upwards 600 active users and would like to be able to utilize mantis for trouble tickets with those.

We are also a gaming clan in a particular universe where diplomacy and in-game customer relations is key. We would like to use mantis to field those requests, as well as allow our clan officers to track their projects in the clan more easily and visibly.

My question here is, if we use MantisBT, is there a way to build a Discord bot that can integrate with Mantis and submit tickets via chat command.

I know it's an odd ask for something like this - But I remember using an older version of mantis for submitting mod request changes or bug reports with our old minecraft servers, and with the advent of Discord I was hoping for the possibility of creating a bot to submit requests.

(I'm not the dev in the group, he asked me to pose the question since I am spearheading the research on the project.)


I am also asking on behalf of another server admin group that I am not a leading member of, as they seemed to warm up to the idea of Discord Integration.

In Service,
Dovaskus -XO
Black Star Initiative
Dovaskus
Posts: 3
Joined: 08 Jun 2018, 15:52

Re: Discord integration question.

Post by Dovaskus »

Realised this is not likely the place for this post - moving it to the correct forum.
Starbuck
Posts: 219
Joined: 14 Feb 2006, 02:53
Location: USA
Contact:

Re: Discord integration question.

Post by Starbuck »

You're in an area that's dear to my heart. I have sites dedicated to gamer communications that are in development and we'll have similar requirements.

I hope this response isn't taken as flippant - but yes, with a plugin, you can bridge from any API X to create tickets with Mantis. I'd give the same response if the source of the data was Slack, Skype, or even this phpBB forum.

It's really just an X/Y problem. You want to get data from X and send it to Y. X is Discord and Y is MantisBT. For a great example of how to get data into MantisBT, I think the EmailReporting plugin might be an excellent reference. In that case the X is an email. The plugin just parses data from the email as some generic middle-tier, and then uses the API of MantisBT to do whatever is required. In your case, Discord is the X .... and now that I think about it, if you can use the Discord API to generate a formatted email, then that can be processed from EmailReporting. That eliminates one entire side of the X/Y equation for you.

I know nothing about Discord APIs for outbound or inbound comms. If you do create something like this, it would be really cool if you FOSSed it and then documented it here for others to use.

With a simple search I found what looks like your middleware:
https://gist.github.com/RalphORama/6890 ... a804974686
I believe that will send a message from a user to email, which can be polled by EmailReporting.
Your challenge would be to format the user text into the format required by EmailReporting so that it recognizes all of the fields.

Any help?
Good luck!
If you want Mantis to work differently, use or create a plugin. Visit the Plugins forums.
Ask developers to create a plugin that you need - and motivate them to help you!
Dovaskus
Posts: 3
Joined: 08 Jun 2018, 15:52

Re: Discord integration question.

Post by Dovaskus »

I don't see this as flippant at all! :D It's a road in the right direction, and I can refer this over to the guy with the know how, and likely get it done, whilst learning something in the process.

I will let you know should anything come of this and get back with you for sure.

Thank you so much for the direction!

Regards,
Dova.

Added note:

This is all new to me as I've not delved into anything like this by myself, I'm using this as a learning tool as much as I am using it for our intended purpose, and you allowing me to see the information I may not have the skill yet to see myself will better help me figure this out.

I know next to nothing about what I'm doing in the dev environment, and I figured, the only way to learn for me, is to jump in and break some things until they work.


Thank you again!
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Discord integration question.

Post by atrol »

I would use the Mantis SOAP or REST API for it.
Please use Search before posting and read the Manual
Starbuck
Posts: 219
Joined: 14 Feb 2006, 02:53
Location: USA
Contact:

Re: Discord integration question.

Post by Starbuck »

What @atrol suggests is also a good approach, probably the best direct approach. I just wanted to offer a short-term but effective solution that would yield some gratification with the least amount of effort.

In any X/Y interface you of course have the From-X side and the To-Y side.The challenge is how to approach that middleware.

What I proposed is:

Discord > Discord API sample code for email > email/internet > EmailReporting plugin > Mantis

What @arol proposed is:

Discord > Different API code with a web service client > internet > Mantis web service server API > Mantis

You can't or don't want to change the X and the Y, both sides have outbound and inbound interfaces. Those are what you need to hook up with custom middleware. The choice of how to do that depends on preferences, skills, existing code, and other considerations.

I'd prefer the web service approach too because it avoids the grief of having to setup an email account, and perhaps having to deal with the overhead in the great EmailReporting plugin. But now we're down to "do you want to use existing code, get it done fast, and deal with some inconvenience" or "do you want to write the middleware, keep it short and concise, have full grasp of that code"?

It's like a Make or Buy choice. We either have time and skills to do things ourselves or we rely more heavily on others to do things for us, and pay some kind of price for that convenience.

Again, all of this applies to any X/Y, whether it's Zapier>Mantis, Mantis>Slack, Bugzilla>Mantis, or Mantis>IFTTT (to have your house lights flash whenever you close a ticket).

I hope that helps in your quest to understand connectivity like this, to understand Mantis, and with anything else that you do with your cool-sounding site.

And I really hope this thread helps others who have that very common "how do I connect Mantis to Foo?" question.
If you want Mantis to work differently, use or create a plugin. Visit the Plugins forums.
Ask developers to create a plugin that you need - and motivate them to help you!
Post Reply