A Discord bot for linking to Mojira tickets and various server moderation tasks.
Report Bug
·
Request Feature
MojiraBot was written by violine1101 for use with Node.js, first in a single JavaScript file and later in TypeScript. Its purpose is to link to Mojira tickets and provide information about them inside of Discord. It also provides some moderation tools.
If you want to tinker around with the project on your local PC or run your own instance of the bot, you can simply go ahead!
Here's a guide on how you can do that.
You need to have installed Git, node.js, and NPM.
In order to use a Discord bot, you need to create one on the Discord developer portal.
You can download this repository with the following command:
git clone https://github.com/mojira/mojira-discord-bot.git
In order to install the dependencies, simply use this command:
npm install
There are multiple configuration files that are used to configure the bot. They are all located in the directory config
.
In order to run the bot, you need to set up a local.yml
file for the bot's credentials. In order to do so, follow the steps outlined in the local.template.yml
file.
There are multiple deployment configurations for different instances of the bot. Currently the following configurations are available:
main
– Main MojiraBot on the Mojira Discord serverbeta
– violine1101's beta testing bot
You can create another configuration like that for your own bot.
An overview / documentation of all config options can be found in template.yml
.
For testing or development purposes, it is recommended to run the bot using the following command:
NODE_ENV=<deployment> npm run bot
where <deployment>
is the name of a deployment configuration (main
or beta
).
To deploy the bot, you need to run the following command:
./start.sh <deployment>
where <deployment>
is the name of a deployment configuration (main
or beta
).
Note that the bot is started in a detached screen, which means you won't see any output and the bot is running in the background.
You can stop the bot with ./stop.sh <deployment>
or restart it with ./restart.sh <deployment>
.
For the bot to function properly, the minimal Discord permissions bitfield is 268790848
.
This project depends on the following projects, thanks to every developer who makes their code open-source! ❤️
...and of course all the typings from DefinitelyTyped!
You're very welcome to contribute to this project! Please note that this project uses TypeScript ESLint to ensure consistent code, you can execute npm run lint
to fix lint warnings and errors automatically.
Please head over to bugs.mojang.com, search whether your bug is already reported and if not, create an account and click the red "Create" button on the top of the page.
Distributed under the GNU General Public License v3.0. See LICENSE.md
for more information.