Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

devland.js

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devland.js - npm Package Compare versions

Comparing version 1.1.9 to 1.1.10

2

package.json

@@ -10,3 +10,3 @@ {

"name": "devland.js",
"version": "1.1.9",
"version": "1.1.10",
"description": "A powerful API wrapper for the Discord API designed for modern bots",

@@ -13,0 +13,0 @@ "main": "index.js",

@@ -156,3 +156,3 @@ const { EventEmitter } = require('events')

},
ping: null
ping: -1
}

@@ -159,0 +159,0 @@

const Client = require('../../client/client')
const { Guild, TextChannel, Message, DmChannel, User } = require('../../models')
const { Guild, TextChannel, Message, DmChannel, User, Member } = require('../../models')
module.exports = {

@@ -35,2 +35,10 @@ name: 'message',

if (!channel) return
let member;
if(!data.webhook_id) member = guild.members.get(data.author?.id) || await client.rest.get(client._ENDPOINTS.MEMBERS(guild.id, data.author?.id))
let user;
if(member && !(member instanceof Member) && !member.user) user = client.users.get(data.author?.id) || await client.rest.get(client._ENDPOINTS.USER(data.author?.id))
if(user && !(user instanceof User)) user = new User(client, user)
if(user && !member.user) member.user = user
if(member && !(member instanceof Member)) member = new Member(client, guild, member)
data.member = member
let message = new Message(client, guild, new TextChannel(client, guild, channel), data)

@@ -37,0 +45,0 @@ /**

const Client = require('../../client/client')
const { Guild, TextChannel, Message, DmChannel } = require('../../models')
const { Guild, TextChannel, Message, DmChannel, Member, User } = require('../../models')
module.exports = {

@@ -49,2 +49,10 @@ name: 'messageUpdate',

if (!channel) return
let member;
if(!data.webhook_id) member = guild.members.get(data.author?.id) || await client.rest.get(client._ENDPOINTS.MEMBERS(guild.id, data.author?.id))
let user;
if(member && !(member instanceof Member) && !member.user) user = client.users.get(data.author?.id) || await client.rest.get(client._ENDPOINTS.USER(data.author?.id))
if(user && !(user instanceof User)) user = new User(client, user)
if(user && !member.user) member.user = user
if(member && !(member instanceof Member)) member = new Member(client, guild, member)
data.member = member
let message = new Message(client, guild, new TextChannel(client, guild, channel), data)

@@ -51,0 +59,0 @@

@@ -66,3 +66,3 @@ const Client = require('../client/client')

this.authorId = this.webhookId ? this.webhookId : data.author.id
this.member = this.webhookId ? null : this.guildId ? this.guild.members.get(this.authorId) : null
this.member = this.webhookId ? null : this.guildId ? this.member ? this.member : this.guild.members.get(this.authorId) : null
this.interaction = data.interaction

@@ -69,0 +69,0 @@ this.data_is_available = true

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc