M3O has stopped their free service. This means that this modmail bot will not work unless you pay for a subscription at M3O. We will look into alternatives, but be aware that they might be harder to implement.
This is a Modmail Discord bot, similar to Reddit's Modmail system.
Members of a Discord server can direct message this bot to start a dialogue with the staff members.
Within the Discord server, staff see this as a text channel being made. Staff can respond to the member in the channel, using the bot's prefix or slash commands.
If they send a message into the channel normally (with no prefix), it will only be seen in that channel and not sent to the user.
This allows members to directly talk to staff members without unnecessary pinging and allows staff members to have a coherent dialogue about the subject of the Modmail in one place.
URL to share: https://autocode.com/app/creepertown/modmail-bot
For support, please send a message to @Lars.#0018 in the Autocode Discord server or a DM.
Thanks to @𝙍𝙞𝙘𝙤#0135 for some bug fixing and ideas!
- Register an account at M3O. M3O is the service that is used for the storage of the logs of your modmails.
- Go to the API-keys page and create a new API key. For security purposes, you might want to limit the scopes of your API key. You can do so, as long as the API-key you will be using for this project has access to database (db) and file.
- Input your API key as the variable m3oKey.
- Fill in the other variables.
- Install the app and run
/modmail setup inside the server you set in the variables.
I copied the API-key from M3O and it worked at first, but now I get an invalid API-key error!
You probably copied the temporary API key that is only valid during that session. Generate a new API key at the API-key page and change the key to that API key.
My logs show
<undefined> in the close message.
You either have provided an invalid API key or you used the temporary API key as explained in the first FAQ. Regenerate your API key via the API key page and try again.
I want to delete the upload part of the logs
We spent a lot of time implementing the logging. If you really want to remove it, you will have to figure out what parts of the code to delete yourself. It will be added in the future some time (probably).
I want to have the modmail bot in multiple servers
Due to the nature of modmail bots, we highly advise against using the bot in multiple servers, even after modifying it. We will not be providing any support for "multi-guild" uses.
Unless you want to see the world burn, you should not try and run an unmodified version of this bot in multiple servers. I will guarantee you that it will not work as expected. If you want to run it in multiple servers, please make the necessary modifications that I was unable to make. In a future version, I might update it to work in multiple versions, but I cannot make any promises.
Plans for the future
- Emoji support inside
.txt file instead of filtering
- Make uploading logs optional
- Add a cancel deletion button
- Multi-guild support
- Notification when user send a new message
- Add support for
message.create, which means that all messages get saved by default (very request intensive)
- A way to search for/in previous logs
- Thanks to @Fatsack#0051 and @Nintendo_bot#7518 for suggesting using threads. We will definetely look into it for the future!
- Support for multiple support roles
For all updates, please see below.
Added clearance of a kv-pair when installing the app, which allows a fresh install
Fixed breaking change that occured in version
Added a check to delete kv-pairs for non-existing channels (that for example got manually deleted)
Be aware that M3O updated their limits to a 1000 requests per month (compared to 100.000 before), which means that you might need to get a paid subscription to use all features.
Modmail now sends a message when a user leaves the guild (requires
Server Members Intent to be enabled inside the Discord Developer Portal)
Added version checker (thanks to ChilliHero and AkaNixon for developing it!)
Changed "timezone" of daily file to UTC
Added checking for the right guild
Additional debugging options
Added error message for invalid API key
Updated Readme with new FAQ
console.log for the
pushtofile function, as that one is throwing some errors for users.
Pushed a fix for channels possibly not closing properly