Skip to content

Commit

Permalink
additional validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Aug 22, 2024
1 parent b5d819f commit 2d8a6fc
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/managers/ChannelMessageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class ChannelMessageManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");
if (!channel)
throw new TypeError("GLUON: Channel must be a valid channel instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/GuildChannelsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class GuildChannelsManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/GuildEmojisManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class GuildEmojisManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/GuildInviteManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class GuildInviteManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/GuildMemberManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class GuildMemberManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/GuildRoleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class GuildRoleManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/GuildScheduledEventManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class GuildScheduledEventManager extends BaseCacheManager {

if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be a Client instance.");
if (!guild)
throw new TypeError("GLUON: Guild must be a valid guild instance.");

/**
* The client instance.
Expand Down
2 changes: 2 additions & 0 deletions src/managers/MessagePollManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class MessagePollManager {
constructor(client, existingResponses = {}) {
if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be an instance of Client.");
if (typeof existingResponses !== "object")
throw new TypeError("GLUON: Existing responses must be an object.");

/**
* The client instance.
Expand Down
3 changes: 3 additions & 0 deletions src/managers/MessageReactionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class MessageReactionManager {
constructor(client, guild, existingReactions = {}) {
if (!(client instanceof Client))
throw new TypeError("GLUON: Client must be an instance of Client.");
if (!guild) throw new TypeError("GLUON: Guild must be provided.");
if (typeof existingReactions !== "object")
throw new TypeError("GLUON: Existing reactions must be an object.");

/**
* The client instance.
Expand Down

0 comments on commit 2d8a6fc

Please sign in to comment.