diff --git a/packages/discord.js/src/sharding/ShardClientUtil.js b/packages/discord.js/src/sharding/ShardClientUtil.js index 269d5c6c6ff6..7c5586da29d6 100644 --- a/packages/discord.js/src/sharding/ShardClientUtil.js +++ b/packages/discord.js/src/sharding/ShardClientUtil.js @@ -206,7 +206,7 @@ class ShardClientUtil { */ _respond(type, message) { this.send(message).catch(err => { - const error = new Error(`Error when sending ${type} response to master process: ${err.message}`); + const error = new globalThis.Error(`Error when sending ${type} response to master process: ${err.message}`); error.stack = err.stack; /** * Emitted when the client encounters an error.