Skip to content

Commit

Permalink
Update to Eris 0.11.1 and update the error handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Dec 21, 2019
1 parent 84e1318 commit ab3f338
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"tslint.enable": false,
"eslint.packageManager": "yarn",
"eslint.autoFixOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
3 changes: 3 additions & 0 deletions components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ mutation variables(
necessary permissions. This enables features such as colored roles or announcement \
pings.'}
</Typography>
<Typography gutterBottom>
Use | to separate roles. If a role contains |, it will not be added to the list.
</Typography>
<FormControl fullWidth>
<InputLabel>Role Names</InputLabel>
<Input
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@material-ui/core": "^3.0.1",
"@material-ui/icons": "^3.0.1",
"apollo-boost": "^0.1.4",
"eris": "^0.10.1",
"eris": "^0.11.1",
"graphql": "^14.0.2",
"graphql-yoga": "^1.16.7",
"isomorphic-unfetch": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion server/bot/commands/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const handleServerinfo: Command = {
// Nitro Boosting support.
const boost = guild.premiumTier ? [{
name: '<:boost:602100826214760452> Boost Status',
value: `Level ${guild.premiumTier} with ${guild.premiumSuscriptionCount} Boosts`,
value: `Level ${guild.premiumTier} with ${guild.premiumSubscriptionCount} Boosts`,
inline: true
}] : []
// Display information.
Expand Down
8 changes: 5 additions & 3 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import CommandParser from './bot/client'
import { MongoClient } from 'mongodb'
// Import fs.
import { readdir, statSync } from 'fs'
import { inspect } from 'util'
// Import the bot.
import { guildMemberAdd, guildMemberRemove, guildDelete } from './bot'
// Get the token needed.
Expand All @@ -32,7 +33,8 @@ const port = parseInt(process.env.PORT, 10) || 3000 // If port variable has been

// Create a client to connect to Discord API Gateway.
const client = new Client(token === 'dotenv' ? process.env.IVEBOT_TOKEN : token, {
autoreconnect: true, restMode: true
autoreconnect: true,
restMode: true
})

// Connect ASAP, hopefully before the server starts.
Expand Down Expand Up @@ -90,8 +92,8 @@ client.on('ready', () => {
})

// Disconnection from Discord by error will trigger the following.
client.on('error', (err: string, id: string) => {
if (!dev) throw new Error(`Error: ${err}\nShard ID: ${id}`)
client.on('error', (err: Error, id: string) => {
console.error(`Error: ${inspect(err)}\nShard ID: ${id}`)
})

// Create a database to handle certain stuff.
Expand Down
25 changes: 15 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,11 @@ async-each@^1.0.1:
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735"
integrity sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==

async-limiter@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==

async-limiter@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
Expand Down Expand Up @@ -2726,12 +2731,12 @@ enhanced-resolve@^4.1.0:
memory-fs "^0.4.0"
tapable "^1.0.0"

eris@^0.10.1:
version "0.10.1"
resolved "https://registry.yarnpkg.com/eris/-/eris-0.10.1.tgz#1ecc13ff06d45edb86c344b70ec2dd2e7ef270df"
integrity sha512-POWCQ91xmG75U5V3i2bAvh/hco+HkgF+YJzerTcULe++AgKutA4l1adxqUrJ13Nxah/O+olkkQCufO+gQoawtA==
eris@^0.11.1:
version "0.11.1"
resolved "https://registry.yarnpkg.com/eris/-/eris-0.11.1.tgz#b4c9ba9645c5eef9f9922c2be3c41395a3121a61"
integrity sha512-Ct32iXjESOnmklxZCEA281BQsTlAsS9xzQkbGlnvzXshCjBptWJ5h8Oxbu67ui1DirsYs0WipB8EBC9ITQ5ZQA==
dependencies:
ws "^6.0.0"
ws "^7.1.2"
optionalDependencies:
opusscript "^0.0.4"
tweetnacl "^1.0.0"
Expand Down Expand Up @@ -7284,12 +7289,12 @@ ws@^5.2.0:
dependencies:
async-limiter "~1.0.0"

ws@^6.0.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb"
integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==
ws@^7.1.2:
version "7.2.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.0.tgz#422eda8c02a4b5dba7744ba66eebbd84bcef0ec7"
integrity sha512-+SqNqFbwTm/0DC18KYzIsMTnEWpLwJsiasW/O17la4iDRRIO9uaHbvKiAS3AHgTiuuWerK/brj4O6MYZkei9xg==
dependencies:
async-limiter "~1.0.0"
async-limiter "^1.0.0"

xdg-basedir@^3.0.0:
version "3.0.0"
Expand Down

0 comments on commit ab3f338

Please sign in to comment.