New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

transporttycoon

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transporttycoon - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

lib/index.d.ts

@@ -11,2 +11,3 @@ import { PlayerPositions } from './models/PlayerPositions';

import { Economy } from './models/Economy';
import { OwnedVehicles } from './models/OwnedVehicles';
export declare class TransportTycoon {

@@ -33,2 +34,3 @@ private token;

getUserBusinesses(userId: string): Promise<Business>;
getUserOwnedVehicles(userId: string): Promise<OwnedVehicles>;
getUserFaction(userId: string): Promise<Faction>;

@@ -35,0 +37,0 @@ getUserData(userId: string): Promise<UserData>;

23

lib/index.js

@@ -148,3 +148,3 @@ "use strict";

async getUserInventoryHtml(userId) {
if (userId.length === 18)
if ((userId.length === 18 || userId.length === 17))
userId = (await this.getUserFromDiscord(userId)).user_id.toString();

@@ -162,3 +162,3 @@ try {

async getUserBusinesses(userId) {
if (userId.length === 18)
if ((userId.length === 18 || userId.length === 17))
userId = (await this.getUserFromDiscord(userId)).user_id.toString();

@@ -175,4 +175,17 @@ try {

}
async getUserOwnedVehicles(userId) {
if ((userId.length === 18 || userId.length === 17))
userId = (await this.getUserFromDiscord(userId)).user_id.toString();
try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/ownedvehicles/${userId}`);
return Promise.resolve(res.data);
}
catch (err) {
return Promise.reject(err);
}
}
async getUserFaction(userId) {
if (userId.length === 18)
if ((userId.length === 18 || userId.length === 17))
userId = (await this.getUserFromDiscord(userId)).user_id.toString();

@@ -190,3 +203,3 @@ try {

async getUserData(userId) {
if (userId.length === 18)
if ((userId.length === 18 || userId.length === 17))
userId = (await this.getUserFromDiscord(userId)).user_id.toString();

@@ -204,3 +217,3 @@ try {

async getUserDataAdvanced(userId) {
if (userId.length === 18)
if ((userId.length === 18 || userId.length === 17))
userId = (await this.getUserFromDiscord(userId)).user_id.toString();

@@ -207,0 +220,0 @@ try {

{
"name": "transporttycoon",
"version": "1.0.5",
"version": "1.0.6",
"description": "Wrapper for the Transport Tycoon FiveM server API",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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