Author: Radka Gustavsson, rhea.dev
Please take a look at our website to see what's the bot about, full list of features, invite and configuration: http://valkyrja.app
- Please read the Contributing file before you start =)
- Fork this repository, and then clone it recursively to get the Core library as well:
git clone --recursive [email protected]:YOURUSERNAME/Valkyrja.modmail.git
- Nuke your nuget cache
dotnet nuget locals all --clear
The Valkyrja project is split into these repositories:
Valkyrja.coreLite
- Core client code.Valkyrja.modmail
- Modmail by Valkyrja.
Valkyrja Project offers hosting of this bot for its Patreon subscribers and any other Open Source oriented community or project. (This is subject to change from Patreon to GH-Sponsors in the near future.)
You will need to create a Discord Bot.
//todo
- Install .NET Core preferably using your package manager, e.g:
$ sudo dnf install dotnet
on Fedora. - Clone this repository recursively:
git clone --recursive [email protected]:ValkyrjaProject/Valkyrja.modmail.git
- Run it with
dotnet run
to create an emptyconfig.json
- Move the
config.json
into thebin/Release/
(you need to create these folders first) and then modify it to configure the the bot - more details in the Configuration section. - Copy the example systemd unit file
systemd-example.service
into the/etc/systemd/system/
path:$ sudo cp systemd-example.service /etc/systemd/system/modmail.service
- Modify this file to reflect the correct path to the project, based on wherever you cloned it.
- Enable and start the service:
$ sudo systemctl enable --now modmail
//todo Issue #1
config.json
contains these properties with their default values:
-
"ModmailServerId" = 0
- ID of a server on which you wish to have modmail threads. -
"ModmailCategoryId" = 0
- Main modmail category for active threads. -
"ModmailArchiveCategoryId" = 0
- Archive category where closed threads live. -
"ModmailArchiveLimit" = 5
- Oldest threads will be deleted after exceeding this number of closed threads in the Archive. -
"ModmailFooterOverride" = ""
- Defaults to configured roles for Admin or Moderator if left empty. -
"ModmailNewThreadMessage" = ""
- Used to ping the staff for newly created threads - use raw mention format:<@&roleid>
-
"ModmailEmbedColorAdmins" = "#ff0000"
- Embed color for Admin messages. -
"ModmailEmbedColorMods" = "#0000ff"
- Embed color for Moderator messages. -
"ModmailEmbedColorMembers" = "#00ff00"
- Embed color for all other member messages. -
"DiscordToken" = "asdfasdfasdf"
- Your Discord token goes here, don't forget the quotes. -
"GameStatus" = "PM me to reach Mods!"
- The "Playing..." status message. -
"CommandPrefix" = "!"
- How the commands will be triggered. -
"OwnerUserId" = 0
- User ID of the administrator of this bot. -
"NotificationChannelId" = 0
- This channel may be used to notify the team of possible errors. -
"AdminRoleIds" = [0]
- A list of role IDs that will have Admin permissions. -
"ModeratorRoleIds" = [0]
- A list of role IDs that will have Moderator permissions. -
"SubModeratorRoleIds" = [0]
- A list of role IDs that will have SubModerator permissions.
You are advised to leave everything else with its default value.
You need to create the Modmail and Modmail Archive categories yourself, and allow the bot to correctly function in these.
We recommend that you give it a hoisted role with merely Read Messages permission so that the bot can be displayed in all channels, and then configure these two categories to have the following permissions:
Manage Channel
, Read & See Channels
, Send Messages
, Manage Messages
, Embed Links
, Attach Files
, Read Message History
, Add Reactions