Comparing version 1.2.8 to 1.2.9
{ | ||
"name": "satella", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"description": "Satella - A wrapper for the Discord API made in JS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,3 +29,3 @@ /* eslint-disable no-undef-init */ | ||
if(parseInt(e.type) === 1){ | ||
if(e.type == 1){ | ||
channel = new DMChannel(client, e) | ||
@@ -32,0 +32,0 @@ client.channels.dmchannels.set(channel.id, channel); |
@@ -0,1 +1,2 @@ | ||
/* eslint-disable padded-blocks */ | ||
const Chest = require('../Utils/Chest'); | ||
@@ -14,4 +15,12 @@ const Mentions = require('./Mentions'); | ||
this.guild = client.guilds.get(data.guild_id); | ||
this.channel = client.channels.dmchannels.get(data.channel_id) || this.guild.channels.get(data.channel_id) || undefined | ||
if(client.channels.channels.get(data.channel_id)){ | ||
this.channel = client.channels.channels.get(data.channel_id) | ||
}else if(client.channels.dmchannels.get(data.channel_id)){ | ||
this.channel = client.channels.dmchannels.get(data.channel_id) | ||
}else{ | ||
this.channel = undefined | ||
} | ||
if(this.channel && this.channel.type == 1){ | ||
@@ -18,0 +27,0 @@ this.user = this.channel.users.first() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41324
1159