From b08f5d1669bdb098c3249e353f9b4be1ec2e19bd Mon Sep 17 00:00:00 2001 From: brokenedtzjs Date: Wed, 31 Jan 2024 02:25:08 +0700 Subject: [PATCH] update to github --- README.md | 17 ++++++++--------- lib/error/StarboardError.js | 13 +++++++++++++ lib/error/messageError.js | 13 +++++++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 lib/error/StarboardError.js create mode 100644 lib/error/messageError.js diff --git a/README.md b/README.md index c9d6256..36ecf0f 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,21 @@ const client = ({ const starboard = new Starboard({ client: client, -}) -module.exports = starboard; +}); +client.starboard = starboard; + +module.exports = client; ``` - starboard.js ```js -const client = require('your bot.js folder'); +const client = require('your bot.js'); const { Events } = require('discord.js'); -const starboard = require('your bot.js folder'); client.on(Events.MessageReactionAdd, (reaction) => { - starboard.listener(reaction); + client.starboard.listener(reaction); }); client.on(Events.MessageReactionRemove, (reaction) => { - starboard.listener(reaction); + client.starboard.listener(reaction); }); ``` @@ -60,9 +61,7 @@ client.on(Events.MessageReactionRemove, (reaction) => { Discord ## Contributor -
-brokenedtzjs -
+
brokenedtzjs
## License & Copyright ``` diff --git a/lib/error/StarboardError.js b/lib/error/StarboardError.js new file mode 100644 index 0000000..4406245 --- /dev/null +++ b/lib/error/StarboardError.js @@ -0,0 +1,13 @@ +'use strict'; + +/*! + * ignore + */ + +class StarboardError extends Error { } + +Object.defineProperty(StarboardError.prototype, 'name', { + value: 'StarboardError' +}); + +module.exports = StarboardError; \ No newline at end of file diff --git a/lib/error/messageError.js b/lib/error/messageError.js new file mode 100644 index 0000000..db99754 --- /dev/null +++ b/lib/error/messageError.js @@ -0,0 +1,13 @@ +'use strict'; + +/*! + * ignore + */ + +class MessageError extends Error { } + +Object.defineProperty(MessageError.prototype, 'name', { + value: 'MessageError' +}); + +module.exports = MessageError; \ No newline at end of file