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.4.3 to 1.4.4

2

package.json

@@ -12,3 +12,3 @@ {

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

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

@@ -479,2 +479,7 @@ const { EventEmitter } = require('events')

else if (channel.type === 15) channel = new ForumChannel(this, guild, channel)
else if (channel.type === 4) {
channel = new CategoryChannel(this, guild, channel)
channel.childrens = []
this.allChannels.filter(child => child.parent_id === channel.id || child.parentId === channel.id).map(child => channel.childrens.push(child.id))
}
return resolve(channel)

@@ -481,0 +486,0 @@ } else {

@@ -558,2 +558,29 @@ const Client = require('../client/client')

getFocusedName(){
if(!this.isAutoCompleteRequest) throw new TypeError("This function can be used on a auto complete request")
if (!this.data) return this.client.options.invalidCommandValueReturnNull ? null : undefined
if (!this.data?.options || this.data?.options?.length < 1) return this.client.options.invalidCommandValueReturnNull ? null : undefined
let value = this.data.options.find(option => option.focused)?.name
if (!value) return this.client.options.invalidCommandValueReturnNull ? null : undefined
return value
}
getFocusedType(){
if(!this.isAutoCompleteRequest) throw new TypeError("This function can be used on a auto complete request")
if (!this.data) return this.client.options.invalidCommandValueReturnNull ? null : undefined
if (!this.data?.options || this.data?.options?.length < 1) return this.client.options.invalidCommandValueReturnNull ? null : undefined
let value = this.data.options.find(option => option.focused)?.type
if (!value) return this.client.options.invalidCommandValueReturnNull ? null : undefined
return value
}
getFocusedValue(){
if(!this.isAutoCompleteRequest) throw new TypeError("This function can be used on a auto complete request")
if (!this.data) return this.client.options.invalidCommandValueReturnNull ? null : undefined
if (!this.data?.options || this.data?.options?.length < 1) return this.client.options.invalidCommandValueReturnNull ? null : undefined
let value = this.data.options.find(option => option.focused)?.value
if (!value) return this.client.options.invalidCommandValueReturnNull ? null : undefined
return value
}
getTargetUser() {

@@ -560,0 +587,0 @@ if (!this.isUserContext) throw new TypeError("This function can be used on a user context only")

@@ -234,3 +234,3 @@ const Utils = require('../util')

if (typeof type !== "string" || type === "auto") type = user.banner.startsWith('a_') ? 'gif' : 'png'
else return resolve(`https://cdn.discordapp.com/banners/${this.id}/${user.banner}.${type}?size=${size}`)
return resolve(`https://cdn.discordapp.com/banners/${this.id}/${user.banner}.${type}?size=${size}`)
})

@@ -244,5 +244,5 @@ }

if (typeof type !== "string" || type === "auto") type = user.avatar.startsWith('a_') ? 'gif' : 'png'
else return resolve(`https://cdn.discordapp.com/avatars/${this.id}/${user.avatar}.${type}?size=${size}`)
return resolve(`https://cdn.discordapp.com/avatars/${this.id}/${user.avatar}.${type}?size=${size}`)
})
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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