Dragory / modmailbot

Modmail Bot is a bot for Discord that makes it easier for users to contact moderators and admins for help.
MIT License
699 stars 701 forks source link

Dashboard #345

Open ClearlyElevated opened 5 years ago

ClearlyElevated commented 5 years ago

Packing the bot with a Dashboard for users locally hosting. I mean I'm sure it would work on an outsourced host. But for using local hosting it would be much easier to setup for first time users. Then don't it in heroku or something like that..

If you like this idea. I can send you the dashboard I made for my bot. And I think you could make a few minior adjustments to the button titles and what not. And quickly put it into motion.

I tried doing it myself but was unsuccessful. (Fairly new to writing code) but if this is something that shins reasonable I'm willing to provide the base. I guess I'm thinking like a "LogViewer" type Dashboard. But instead of seeing the logs. You can optionally see logs. & See guild stats, and configure all the bot settings from the site as well (it also is already ready for everything I mentioned above)

Dragory commented 5 years ago

A dashboard is something I've wanted to add to the bot for some time, but just haven't had the time for. I do think it needs to be well thought out before it's implemented though, and if you'd like to work on it, I'd rather have it built specifically for modmail rather than retrofitting it from another bot.

That being said, even if the dashboard allowed you to tweak every config option in the bot, there would still be a need for some manual configuration - mainly to set up access to the dashboard itself. A Discord OAuth2 login would probably be the most idiomatic approach here, which would require setting a client secret etc. in the config. One approach that's used in e.g. some CMS's (like wordpress) is that the first time you open the site (or dashboard, in this case) it runs you through the setup. I'd rather not do that though, because the dashboard is an optional part of the bot and a lot of people could miss it and then just have an open, unsecured dashboard (and/or setup page) accessible from the internet.

I think for the first-time setup specifically, it'd be more straightforward to provide an optional installation script instead that checks your Node version, runs npm ci, asks you about some of the common config options, etc. and sets it all up for you. Then you can keep tweaking either by editing config.json directly or, once it exists, opening the dashboard (which would also optionally be set up during the install script).

So, to summarize, a dashboard would be a great addition to the bot, but I'd keep it separate from the installation process and build it specifically for this bot rather than using one built for another bot and repurposing it.

ClearlyElevated commented 5 years ago

That's understandable. It seems like your already have a vary good idea. I agree on the setup script part. Mine personally only runs localhost unless you move it to a 3rd party and setup a custom domain on that instance. I think the setup whole config in the file area is easy enough. I only have to edit the port, and the localhost url on dev portal to get it running.

It's been a long time since I ran your bot due to not being able to fully understand how to get the bot to stop showing my IP in the log links. Even after specifically setting it to discord storage, that's another reason why being able to manage things like that from the bot itself would be convenient. Not sure if it's all the same but

I have mine on Discord.Js 12.0 and it is easy enough.

Mainly I think the coolest part about a Dashboard for a modmail bot would be being able to use it as more of a "help desk" service and be able to manage the tickets from the dash.

Side Note: even writing light code for my Moderation bot. I've only ever used Json or mongo as a storage provider. I don't get the whole SQLite setup and how to do it all. So if that could be implemented I would definitely be willing to start donating to get it rolling. If it isn't already planned

ANONYM-ANONYM commented 3 years ago

Dashboard for changing config options, viewing logs and more will be great 👍