Skip to content

Commit

Permalink
Fixed two issues and a few typos (#260)
Browse files Browse the repository at this point in the history
* fixed CommandClient.registerGuildPrefix and .onMessageReactionEvent

* followed @macdja38's suggestion

* fixed some typos
  • Loading branch information
LJNeon authored and abalabahaha committed Jul 17, 2017
1 parent 7b08092 commit 3fdb583
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/command/CommandClient.js
Expand Up @@ -169,7 +169,7 @@ class CommandClient extends Client {
}

onMessageReactionEvent(msg, emoji, userID) {
if(!this.ready || userID === this.user.id || !msg.content) {
if(!this.ready || userID === this.user.id || !(msg.content && msg.embeds && msg.attachments)) {
return;
}

Expand Down Expand Up @@ -206,7 +206,7 @@ class CommandClient extends Client {
* @arg {String|Array} prefix The bot prefix. Can be either an array of prefixes or a single prefix. "@mention" will be automatically replaced with the bot's actual mention
*/
registerGuildPrefix(guildID, prefix) {
if(this.preReady){
if(!this.preReady){
this.guildPrefixes[guildID] = prefix;
} else {
if(Array.isArray(prefix)){
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/RequestHandler.js
Expand Up @@ -7,7 +7,7 @@ const SequentialBucket = require("../util/SequentialBucket");
const Zlib = require("zlib");

/**
* Handles APi requests
* Handles API requests
*/
class RequestHandler {
constructor(client, forceQueueing) {
Expand Down
2 changes: 1 addition & 1 deletion lib/structures/Channel.js
Expand Up @@ -52,7 +52,7 @@ class Channel extends Base {

/**
* Create a message in a text channel
* Note: If you want to DM someone, the user ID is **not** the DM channel ID. use Client.getDMChanne() to get the DM channel ID for a user
* Note: If you want to DM someone, the user ID is **not** the DM channel ID. use Client.getDMChannel() to get the DM channel ID for a user
* @arg {String | Object} content A string or object. If an object is passed:
* @arg {String} content.content A content string
* @arg {Boolean} [content.tts] Set the message TTS flag
Expand Down
2 changes: 1 addition & 1 deletion lib/structures/GuildAuditLogEntry.js
Expand Up @@ -11,7 +11,7 @@ const Invite = require("./Invite");
* @prop {String?} reason The reason for the action
* @prop {User} user The user that performed the action
* @prop {String} targetID The ID of the action target
* @prop {(Guild | GuildChannel | Member | Invite | Role | Object)?} target The ID of the action target
* @prop {(Guild | GuildChannel | Member | Invite | Role | Object)?} target The object of the action target
* If the item is not cached, this property will be null
* If the action targets a guild, this could be a Guild object
* If the action targets a guild channel, this could be a GuildChannel object
Expand Down
4 changes: 2 additions & 2 deletions lib/structures/User.js
Expand Up @@ -86,7 +86,7 @@ class User extends Base {
}

/**
* Create a relationship with the user
* Create a relationship with the user (user accounts only)
* @arg {Boolean} [block=false] If true, block the user. Otherwise, add the user as a friend
* @returns {Promise}
*/
Expand All @@ -95,7 +95,7 @@ class User extends Base {
}

/**
* Remove a relationship with the user
* Remove a relationship with the user (user accounts only)
* @returns {Promise}
*/
removeRelationship() {
Expand Down

0 comments on commit 3fdb583

Please sign in to comment.