mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Add a short comment to constructErrorCallback
This commit is contained in:
@@ -4,6 +4,9 @@ import InternalClient from "./InternalClient";
|
|||||||
import EventEmitter from "events";
|
import EventEmitter from "events";
|
||||||
import PMChannel from "../Structures/PMChannel";
|
import PMChannel from "../Structures/PMChannel";
|
||||||
|
|
||||||
|
// This utility function creates an anonymous error handling wrapper function
|
||||||
|
// for a given callback. It is used to allow error handling inside the callback
|
||||||
|
// and using other means.
|
||||||
function constructErrorCallback(callback) {
|
function constructErrorCallback(callback) {
|
||||||
return error => {
|
return error => {
|
||||||
callback(error);
|
callback(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user