Skip to content

Commit 8ecaf18

Browse files
authored
Version 1.1 (KartulUdus#13)
* Fix !register typo in dts example and docs (KartulUdus#8) * Fix !register typo in dts example * Update dts.md * Minor text fixes (KartulUdus#10) * RabbitMQ docs * !track by Area Or distance, not both * ⚠️DB migration! multi monster tracking, forms, raids tracking by level * Configurable <amount> of messages per <seconds> limit for discord alarms * Emoji fixes on all locales * slight fix for {{form}} * Rabbitmq.md where is admin panel * Embed color by iv quality (KartulUdus#11) * Support for embed color by perfection for IV alerts * **Major** text fixes! Linting rules * Catch and advise if Hastebin is down & send location data (only) to discord regardless * Contributing guidelines, travis & PR|Issue templates * Travis please * Travis - broke eslint.json * Travis build status to readme * Docs update for 1.1 features
1 parent c2605ad commit 8ecaf18

33 files changed

+3712
-2598
lines changed

.eslintrc.json

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"parserOptions": { "ecmaVersion": 6 },
3+
"extends": "airbnb-base",
4+
"rules": {
5+
// use tabs, not spaces, and in switch statements the case statement should indent again (the default is to be level with the switch)
6+
"indent": [ "error", "tab", { "SwitchCase": 1 } ],
7+
// if you want to put a blank line at the beginning or end of a block, knock yourself out
8+
"padded-blocks": [ "off" ],
9+
// i like tabs. besides, we set indent to require them
10+
"no-tabs": [ "off" ],
11+
// seriously, who cares if there's a blank line at the end of the file or not?
12+
"eol-last": [ "off" ],
13+
// sometimes having a long single line makes sense, this also seems buggy and inconsistent, so we ignore it
14+
"max-len": [ "off" ],
15+
// webstorm repeatedly tries to add it for us. it's easier not to fight it, even if it's not required.
16+
"strict": [ "off" ],
17+
// when setting the property of an object, you can specify the name even if it's unnecessary (ie: { foo: foo })
18+
"object-shorthand": [ "off" ],
19+
// unused vars are an error, except for function arguments.
20+
// particularly with callbacks we may not use all the args, but we still like knowing they're available
21+
"no-unused-vars": [ "error", { "vars": "all", "args": "none", "ignoreRestSiblings": true } ],
22+
// you don't have to use operator assignment if you don't want to
23+
"operator-assignment": [ "warn" ],
24+
// we don't want else to be on the same line as the closing } of an if statement
25+
"brace-style": [ "error", "stroustrup" ],
26+
// if discord breaks because dangling commas, don't
27+
"comma-dangle": ["error", "only-multiline"],
28+
// it's possible that implicit coercion is not what you intended. webstorm warns about it, so should we
29+
"no-implicit-coercion": [ "warn" ],
30+
// if you wish to call all your errors err, go ahead
31+
"no-shadow": ["error", { "allow": ["err"] }],
32+
// if you're using 'this' somewhere that isn't a class you're probably doing something wrong
33+
"no-invalid-this": [ "error" ],
34+
// if you're not modifying the variable used in a loop condition, you've probably done something wrong...
35+
"no-unmodified-loop-condition": [ "warn" ],
36+
// don't use .call or .apply when you don't need to
37+
"no-useless-call": [ "warn" ],
38+
// forgetting to return after calling a callback is an easy mistake to make, so we'll warn you if you are
39+
"callback-return": [ "warn" ],
40+
// as we want to have dynamic translation files, dynamic require is needed
41+
"import/no-dynamic-require": 0,
42+
// reassigning and returning variables bad; however, \everything\ operator still requires it
43+
"no-param-reassign": 0,
44+
"no-return-assign": 0,
45+
// to keep the cache continuous, the cache object has a dandling _ and needs it
46+
"no-underscore-dangle": 0,
47+
// geocoding backup to OSM on error is unhappy, make these separate and delete this rule please
48+
"consistent-return": 0,
49+
// because Travis-ci does not have config files, therefore this rule cannot error
50+
"import/no-unresolved": 0
51+
}
52+
}

.github/ISSUE_TEMPLATE.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--- Provide a general summary of the issue in the Title above -->
2+
3+
## Expected Behavior
4+
<!--- If you're describing a bug, tell us what should happen -->
5+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
6+
7+
## Current Behavior
8+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
9+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
10+
11+
## Possible Solution
12+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
13+
<!--- or ideas how to implement the addition or change -->
14+
15+
## Steps to Reproduce (for bugs)
16+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
17+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
18+
1.
19+
2.
20+
3.
21+
4.
22+
23+
## Context
24+
<!--- How has this issue affected you? What are you trying to accomplish? -->
25+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
26+
27+
## Your Environment
28+
<!--- Include as many relevant details about the environment you experienced the bug in -->
29+
* Version used:
30+
* Environment name and version (e.g. npm 5.6.0, nodejs v7.4.0):
31+
* Operating System

.github/PULL_REQUEST_TEMPLATE.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## Motivation and Context
7+
<!--- Why is this change required? What problem does it solve? -->
8+
<!--- If it fixes an open issue, please link to the issue here. -->
9+
10+
## How Has This Been Tested?
11+
<!--- Please describe in detail how you tested your changes. -->
12+
<!--- Include details of your testing environment, and the tests you ran to -->
13+
<!--- see how your change affects other areas of the code, etc. -->
14+
15+
## Screenshots (if appropriate):
16+
17+
## Types of changes
18+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
19+
- [ ] Bug fix (non-breaking change which fixes an issue)
20+
- [ ] New feature (non-breaking change which adds functionality)
21+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
22+
23+
## Checklist:
24+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
25+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
26+
<!-- NOTE: In order to check code style locally and avoid having your build rejected by Travis, -->
27+
<!-- run the following commands before you commit: `npm run lint`. Fix anything it is unhappy about -->
28+
- [ ] My code follows the code style of this project.
29+
- [ ] My change requires a change to the documentation.
30+
- [ ] I have updated the documentation accordingly.

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: node_js
2+
node_js:
3+
- "lts/*"
4+
5+
cache:
6+
directories:
7+
- "node_modules"
8+
9+
script:
10+
- npm run lint

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
![logo](https://raw.githubusercontent.com/KartulUdus/PoracleJS/master/docs/_assets/PoracleJS.png)
22

3+
[![Build Status](https://travis-ci.org/KartulUdus/PoracleJS.svg?branch=develop)](https://travis-ci.org/KartulUdus/PoracleJS)
34

45
#### Introduction
56

app/src/discord/client.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const Discord = require('discord.js');
2+
23
const client = new Discord.Client();
34
const config = require('config');
4-
const token = config.discord.token;
5-
const log = require("../logger");
5+
const log = require('../logger');
66

77
module.exports =
88

99
client.on('ready', () => {
10-
log.info(`Discord botto "${client.user.tag}" ready for action!`);
11-
})
10+
log.info(`Discord botto "${client.user.tag}" ready for action!`);
11+
});
1212

13-
client.login(token);
13+
client.login(config.discord.token);
1414

0 commit comments

Comments
 (0)