Code Monkey home page Code Monkey logo

modmail-bot's Introduction

Welcome to modmail-bot ๐Ÿ‘‹

Version Documentation Maintenance License: Apache--2.0 Twitter: DaanGamesDG

The only modmail-bot you need to improve communication in your discord server. Easy to use, requires little permissions, database usage (ticket store) and customisable

Install

yarn install / npm install

Install all needed dependencies in order to work.

Setup

โ— permissions

The best option is go give the bot Administrator permissions, but you can do it the hard way and only give the permissions it needs. Required permissions:

  • Read & Send Messages ~ (obivously) If the bot isn't able to read messages or send messages, it doesn't respond to your requests.
  • Manage Channels ~ (required) This is needed so the bot is able to create / edit / delete channels.
  • Embed Links & Message Attachments ~ (required) Without the bot isn't able to send 9/10 messages.
  • Add Reactions ~ (required) This is needed to show that the ticket owner has received the reply and to be able to setup the ticket claim system.

Starting the bot

It's a really simple process, first you need to rename the .env.example to .env. After that fill in the gaps!

This is what you should fill in:

TOKEN= <discord bot token>
DB= <mongodb url>

WB_ID= <webhook id> -> used to log errors, check the config.json file to turn it off or on!
WB_TOKEN= <webhook token> -> used to log errors, check the config.json file to turn it off or on!

PREFIX= <prefix>

Do not add any spaces, everything should be connected to each other. Otherwise you will get an error. Do the same for the config.json.example file, rename it to config.json.example. Once you done that you can edit the bot's status, activity etc!

Let me show you what is what exactly:

{
	"owners": ["owner_ids_here"], // ids of the users that a have access to owner only commands
	"error_logging": true, // whether or not to enable webhook logging
	"claimChannel": "claim_channel_id", // channel id to claim tickets
	"category": "category_id_here", // category id for the ticket channels (leave emtpy if none)
	"roleId": "helper_role_here", // role for the people that have access to the tickets (leave emtpy if none)
	"transcript": {
		"enabled": false, // whether or not to enable transcripts
		"channel": "channel_id_here" // transcripts channel id
	},
	"client": {
		"activity": "with your tickets!", // activity message
		"type": "PLAYING", // activity type (PLAYING, STREAMING, LISTENING, WATCHING, CUSTOM_STATUS, COMPETING)
		"status": "online", // status type (online, invisible, dnd, idle)
		"hex": "#4B5E6A" // color for the embeds
	}
}

If you remove one of the items / give them the wrong value, the bot might crash. When transcripts are enabled you should have .net runtime installed on your pc, you must have a folder inside the main bot folder called "chatExporter" with the discordChatExporter program inside it, otherwise it won't work. For more information about it please check this. I am not responsable for any issues regarding the transcriptor part.

In order to run the bot you need to have NodeJS, I recommend using the 14.x version. To run the bot open your terminal, go to the correct directory and type yarn run start / npm run start, this will make a build and start the bot. After that, your done! Bot should be running without problems, yay ๐ŸŽ‰.

Commands & Features

The bot has the basic commands such as exec, eval, ping, help but also a close, contact, transcript, blacklist command. When running the close command with transcripts turned on, the bot will display a type status, during this period it is transcripting the channel. This may take a while depending on your pc hardware. Once finished it will delete the channel and save the transcript to a channel.

List of commands:

  • Close
  • Transcript (requires discordChatExporter)
  • Contact
  • Blacklist
  • whitelist
  • Ping
  • Help
  • Stats
  • Eval
  • Exec
  • Reload

Users with Manage Channel permissions bypass the ticket claimer id check, this means they can force close / force transfer a ticket! The database is only used to save ticket data and blacklists, once a ticket is deleted the data in the database will as well. You can get 512mb for free, that's enough for a this bot.

Author

๐Ÿ‘ค DaanGamesDG

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a โญ๏ธ if this project helped you! Feel free to donate me if you want to:
Support via PayPal

๐Ÿ“ License

Copyright ยฉ 2021 DaanGamesDG.
This project is Apache-2.0 licensed.

modmail-bot's People

Contributors

ijskoud avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.