Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7330aa7b1 | ||
|
|
ce71a7c7e5 | ||
|
|
a6a9531107 | ||
|
|
7ce65dc804 | ||
|
|
b2e7598554 | ||
|
|
b467e7d915 | ||
|
|
e21b174fe1 | ||
|
|
f2ea354717 | ||
|
|
fd27afb8f1 | ||
|
|
feac4c792a | ||
|
|
4d31ecd4eb | ||
|
|
fa83071b5c | ||
|
|
4f449954e0 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"extends": "airbnb-base",
|
||||
"parser": "babel-eslint",
|
||||
"parser": "@babel/eslint-parser",
|
||||
"env": {
|
||||
"mocha": true,
|
||||
"node": true
|
||||
|
||||
@@ -5,7 +5,7 @@ name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ main ]
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 13.x, 14.x]
|
||||
node-version: [12.x, 14.x, 15.x, 16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -30,10 +30,9 @@ jobs:
|
||||
- run: npm run save-coverage
|
||||
- name: Report to Coveralls (parallel)
|
||||
uses: coverallsapp/github-action@master
|
||||
env:
|
||||
COVERALLS_FLAG_NAME: run-${{ matrix.test_number }}
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
flag-name: run-${{ matrix.node-version }}
|
||||
parallel: true
|
||||
|
||||
finish:
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ Everything seemed to go fine, which is why you're now receiving this latest upda
|
||||
* `format.webhookAvatarURL`, to customize the unrecognized user webhook avatar (thanks to [Geo1088](https://github.com/reactiflux/discord-irc/pull/419))
|
||||
* `parallelPingFix`, disabled by default, to prevent users of both Discord and IRC getting pings whenever their messages are mirrored to IRC (thanks to [qaisjp](https://github.com/reactiflux/discord-irc/pull/243) originally, follow up in [#502](https://github.com/reactiflux/discord-irc/pull/502) and [#520](https://github.com/reactiflux/discord-irc/pull/520))
|
||||
* `ignoreUsers.discordIds`, to ignore specific Discord users through the bridge by ID instead of name (thanks to [nsavch](https://github.com/reactiflux/discord-irc/pull/508))
|
||||
* A basic Docker image, found at [discordirc/discord-irc](https://hub.docker.com/r/discordirc/discord-irc)! This may not be often updated with the release tags we publish on GitHub, but it should contain a `latest` tag in addition to whichever Git hash is available on master (thanks to [gdude2002](https://github.com/reactiflux/discord-irc/pull/421), follow up in [#498](https://github.com/reactiflux/discord-irc/pull/498))
|
||||
* A basic Docker image, found at [discordirc/discord-irc](https://hub.docker.com/r/discordirc/discord-irc)! This may not be often updated with the release tags we publish on GitHub, but it should contain a `latest` tag in addition to whichever Git hash is available on main (thanks to [gdude2002](https://github.com/reactiflux/discord-irc/pull/421), follow up in [#498](https://github.com/reactiflux/discord-irc/pull/498))
|
||||
|
||||
### Changed
|
||||
* Add support for Node 13, drop testing for Node 6 - [#521](https://github.com/reactiflux/discord-irc/pull/521)
|
||||
@@ -75,13 +75,13 @@ can appear as regular Discord messages:
|
||||

|
||||
|
||||
To enable webhooks, follow part 1 of [this
|
||||
guide](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
|
||||
guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
|
||||
to create and retrieve a webhook URL for a specific channel, then enable it in
|
||||
discord-irc's config as follows:
|
||||
|
||||
```json
|
||||
"webhooks": {
|
||||
"#discord-channel": "https://discordapp.com/api/webhooks/id/token"
|
||||
"#discord-channel": "https://discord.com/api/webhooks/id/token"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
build:
|
||||
docker-compose -f docker-compose.yml up -d --build --remove-orphans
|
||||
@@ -1,6 +1,6 @@
|
||||
# discord-irc [](https://travis-ci.org/reactiflux/discord-irc) [](https://coveralls.io/github/reactiflux/discord-irc?branch=master)
|
||||
[](https://coveralls.io/github/reactiflux/discord-irc?branch=main)
|
||||
|
||||
> Connects [Discord](https://discordapp.com/) and [IRC](https://www.ietf.org/rfc/rfc1459.txt) channels by sending messages back and forth.
|
||||
> Connects [Discord](https://discord.com/) and [IRC](https://www.ietf.org/rfc/rfc1459.txt) channels by sending messages back and forth.
|
||||
|
||||
## Example
|
||||

|
||||
@@ -120,7 +120,7 @@ First you need to create a Discord bot user, which you can do by following the i
|
||||
},
|
||||
// List of webhooks per channel
|
||||
"webhooks": {
|
||||
"#discord": "https://discordapp.com/api/webhooks/id/token"
|
||||
"#discord": "https://discord.com/api/webhooks/id/token"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -137,13 +137,13 @@ can appear as regular Discord messages:
|
||||

|
||||
|
||||
To enable webhooks, follow part 1 of [this
|
||||
guide](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
|
||||
guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
|
||||
to create and retrieve a webhook URL for a specific channel, then enable it in
|
||||
discord-irc's config as follows:
|
||||
|
||||
```json
|
||||
"webhooks": {
|
||||
"#discord-channel": "https://discordapp.com/api/webhooks/id/token"
|
||||
"#discord-channel": "https://discord.com/api/webhooks/id/token"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
discord-irc:
|
||||
image: discord-irc
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
volumes:
|
||||
- ./config:/config/config.json
|
||||
+3
-1
@@ -31,8 +31,10 @@ function run() {
|
||||
)
|
||||
.parse(process.argv);
|
||||
|
||||
const opts = program.opts();
|
||||
|
||||
// If no config option is given, try to use the env variable:
|
||||
if (program.config) process.env.CONFIG_FILE = program.config;
|
||||
if (opts.config) process.env.CONFIG_FILE = opts.config;
|
||||
if (!process.env.CONFIG_FILE) throw new Error('Missing environment variable CONFIG_FILE');
|
||||
|
||||
const completePath = path.resolve(process.cwd(), process.env.CONFIG_FILE);
|
||||
|
||||
Generated
+2041
-4108
File diff suppressed because it is too large
Load Diff
+17
-17
@@ -36,33 +36,33 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^6.0.0",
|
||||
"discord.js": "12.3.1",
|
||||
"commander": "^7.2.0",
|
||||
"discord.js": "^12.5.3",
|
||||
"irc-colors": "1.5.0",
|
||||
"irc-formatting": "1.0.0-rc3",
|
||||
"irc-upd": "0.11.0",
|
||||
"lodash": "^4.17.19",
|
||||
"simple-markdown": "^0.7.2",
|
||||
"lodash": "^4.17.21",
|
||||
"simple-markdown": "^0.7.3",
|
||||
"strip-json-comments": "^3.1.1",
|
||||
"winston": "^3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.10.5",
|
||||
"@babel/core": "^7.11.1",
|
||||
"@babel/preset-env": "^7.11.0",
|
||||
"@babel/register": "^7.10.5",
|
||||
"@babel/cli": "^7.13.16",
|
||||
"@babel/core": "^7.13.16",
|
||||
"@babel/eslint-parser": "^7.13.14",
|
||||
"@babel/preset-env": "^7.13.15",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@istanbuljs/nyc-config-babel": "^3.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-istanbul": "^6.0.0",
|
||||
"chai": "^4.2.0",
|
||||
"chai": "^4.3.4",
|
||||
"coveralls": "^3.1.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"eslint": "^7.6.0",
|
||||
"eslint-config-airbnb-base": "^14.2.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"mocha": "^8.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.25.0",
|
||||
"eslint-config-airbnb-base": "^14.2.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"mocha": "^8.3.2",
|
||||
"nyc": "^15.1.0",
|
||||
"sinon": "^9.0.2",
|
||||
"sinon-chai": "^3.5.0"
|
||||
"sinon": "^10.0.0",
|
||||
"sinon-chai": "^3.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1009,7 +1009,7 @@ describe('Bot', function () {
|
||||
|
||||
context('with enabled Discord webhook', function () {
|
||||
this.beforeEach(function () {
|
||||
const newConfig = { ...config, webhooks: { '#discord': 'https://discordapp.com/api/webhooks/id/token' } };
|
||||
const newConfig = { ...config, webhooks: { '#discord': 'https://discord.com/api/webhooks/id/token' } };
|
||||
this.setCustomBot(newConfig);
|
||||
});
|
||||
|
||||
@@ -1135,7 +1135,7 @@ describe('Bot', function () {
|
||||
|
||||
context('when matching avatars with fallback URL', function () {
|
||||
this.beforeEach(function () {
|
||||
const newConfig = { ...config, webhooks: { '#discord': 'https://discordapp.com/api/webhooks/id/token' }, format: { webhookAvatarURL: 'avatarFrom/{$nickname}' } };
|
||||
const newConfig = { ...config, webhooks: { '#discord': 'https://discord.com/api/webhooks/id/token' }, format: { webhookAvatarURL: 'avatarFrom/{$nickname}' } };
|
||||
this.setCustomBot(newConfig);
|
||||
|
||||
setupUser(this);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
"#withwebhook": "#ircwebhook"
|
||||
},
|
||||
"webhooks": {
|
||||
"#withwebhook": "https://discordapp.com/api/webhooks/id/token"
|
||||
"#withwebhook": "https://discord.com/api/webhooks/id/token"
|
||||
},
|
||||
"ignoreUsers": {
|
||||
"irc": ["irc_ignored_user"],
|
||||
|
||||
Reference in New Issue
Block a user