Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Discord.JS v14 #632

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
72108c6
Hastily update to Discord.JS v13 (logging broken)
aronson Aug 23, 2023
abc17ed
Fix webhooks
aronson Aug 24, 2023
d1fc94e
Hack logging to console.log
aronson Aug 24, 2023
dfbebae
Restore broken logging
aronson Aug 24, 2023
7fbfd3c
Add ping everyone perm
aronson Aug 24, 2023
f578cba
Upgrade winston to fix logging
aronson Aug 24, 2023
9a6f800
Upgrade to discord.js v14
aronson Aug 24, 2023
c6d3d7d
Disable broken partial match through config
aronson Aug 24, 2023
837bb2c
Display displayName instead of userName by default if no nickname
aronson Aug 24, 2023
5a4a960
Update logging event marked incorrectly
aronson Aug 24, 2023
cf1a505
Implement /names command from Discord side
aronson Aug 24, 2023
f8df85b
Remove console.log
aronson Aug 24, 2023
20a50b0
Add initial typescript implementation
aronson Aug 24, 2023
be1edae
Fix: use fetch() instead of cache for guild members, fixes many bugs
aronson Aug 25, 2023
0208281
Add tsconfig.json (oops!)
aronson Aug 25, 2023
4d468e6
Remove underscore lib, fix lodash, fixup configs
aronson Aug 25, 2023
13574c7
Remove unknown casts for correctness
aronson Aug 25, 2023
ed3a746
Refactor withMentions into cleaner, broken out methods. Add allowRole…
aronson Aug 25, 2023
f462e9d
Use async calls at handler level
aronson Aug 25, 2023
eb5c251
Further async methods
aronson Aug 25, 2023
d74eb7c
Await sendToIRC
aronson Aug 25, 2023
1dc0b08
Migrate to tsx and typescript-eslint
aronson Aug 25, 2023
50e9c45
Add prettier and run reformat
aronson Aug 25, 2023
48832c4
Add automatic linter and prettier support
aronson Aug 25, 2023
1a2271d
Add attribution to author field of package.json
aronson Aug 25, 2023
4f5b0b2
Remove unused dependencies
aronson Aug 25, 2023
eab0f69
Update minimum node version per discord.js v14
aronson Aug 25, 2023
3b603f8
Add aronson as contributor
aronson Aug 25, 2023
b74a1c4
Further clean up dependencies and add contributor metadata
aronson Aug 25, 2023
c2e593c
Fix dependency on discord.js to allow minor upgrades
aronson Aug 25, 2023
e3ad847
Commit lockfile
aronson Aug 25, 2023
ff3d46d
Remove deprecated encoding warning
aronson Aug 25, 2023
287ad68
Re-enable encoding
aronson Aug 25, 2023
ab280af
Update .gitignore against .eslintcache
aronson Aug 25, 2023
4f34231
Move name to top of package.json
aronson Aug 25, 2023
4eaaef6
Attribute Kage for /names feature
aronson Aug 25, 2023
82cf265
Switch require to import in cli.ts
aronson Aug 25, 2023
3f5a1ca
Bump Dockerfile to use required node version
aronson Aug 25, 2023
5140fbd
Support default config.json CONFIG_FILE with no params
aronson Aug 25, 2023
195b8b2
Fix typescript errors in logger
aronson Aug 25, 2023
f14e40c
Switch to async/await on import within cli.ts
aronson Aug 25, 2023
45cf0b2
Switch to Worker pattern for bots
aronson Aug 25, 2023
96f8e62
Remove .npmignore
aronson Aug 25, 2023
82b847e
Add contributors in right format
aronson Aug 25, 2023
f06558d
Shake lodash on imports
aronson Aug 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .babelrc

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
22 changes: 11 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ name: Publish Docker image

on:
push:
branches: [ main ]
branches: [main]
release:
types: [ published ]
types: [published]

jobs:
push_to_registry:
name: Publish to Docker Hub
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build and push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: discordirc/discord-irc
tag_with_ref: true
tag_with_sha: true
- uses: actions/checkout@v2
- name: Build and push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: discordirc/discord-irc
tag_with_ref: true
tag_with_sha: true
47 changes: 22 additions & 25 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,42 @@ name: Node.js CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 15.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run save-coverage
- name: Report to Coveralls (parallel)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.node-version }}
parallel: true
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run save-coverage
- name: Report to Coveralls (parallel)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.node-version }}
parallel: true

finish:

needs: test
runs-on: ubuntu-latest

steps:
- name: Report to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

- name: Report to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ config.json

# Build
dist/

# Husky
.husky

# Eslint
.eslintcache
34 changes: 0 additions & 34 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/fixtures/invalid-json-config.json
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading