mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
fix: paths for common typings folder and misc.
This commit is contained in:
1 parent
827a6c1d6e
commit
61fd8ffea6
8 files changed
+10
-11
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { Message, MessageGroup } from '../../phone/src/common/interfaces/messages';
|
import { Message, MessageGroup } from '../../phone/src/common/typings/messages';
|
||||||
import { sendMessageEvent } from '../utils/messages';
|
import { sendMessageEvent } from '../utils/messages';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import { Tweet, Profile } from '../../phone/src/common/interfaces/twitter';
|
import { Tweet, Profile } from '../../phone/src/common/typings/twitter';
|
||||||
import { IMAGE_DELIMITER } from '../../phone/src/apps/twitter/utils/images';
|
import { IMAGE_DELIMITER } from '../../phone/src/apps/twitter/utils/images';
|
||||||
|
|
||||||
const DISCORD_TOKEN_ENV_VAR = 'discord_bot_token';
|
const DISCORD_TOKEN_ENV_VAR = 'discord_bot_token';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import events from '../utils/events';
|
|||||||
import { ESX } from './server';
|
import { ESX } from './server';
|
||||||
import { getSource } from "./functions";
|
import { getSource } from "./functions";
|
||||||
import { pool } from './db';
|
import { pool } from './db';
|
||||||
import { Transfer, Credentials } from '../../phone/src/common/interfaces/bank';
|
import { Transfer, IBankCredentials } from '../../phone/src/common/typings/bank';
|
||||||
import { useIdentifier } from './functions';
|
import { useIdentifier } from './functions';
|
||||||
import { type } from 'os';
|
import { type } from 'os';
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ async function fetchAllTransactions(identifier: string): Promise<Transfer[]> {
|
|||||||
return transactions;
|
return transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchCredentials(): Credentials {
|
function fetchCredentials(): IBankCredentials {
|
||||||
const name = ESX.GetPlayerFromId(getSource()).getName();
|
const name = ESX.GetPlayerFromId(getSource()).getName();
|
||||||
const balance = ESX.GetPlayerFromId(getSource()).getAccount('bank').money
|
const balance = ESX.GetPlayerFromId(getSource()).getAccount('bank').money
|
||||||
|
|
||||||
@@ -86,11 +86,10 @@ onNet(events.BANK_FETCH_TRANSACTIONS, async () => {
|
|||||||
|
|
||||||
onNet(events.BANK_ADD_TRANSFER, async (transfer: Transfer) => {
|
onNet(events.BANK_ADD_TRANSFER, async (transfer: Transfer) => {
|
||||||
const xTarget = ESX.GetPlayerFromId(transfer.targetID);
|
const xTarget = ESX.GetPlayerFromId(transfer.targetID);
|
||||||
const targetSource = xTarget.source;
|
|
||||||
try {
|
try {
|
||||||
const _identifier = await useIdentifier()
|
const _identifier = await useIdentifier()
|
||||||
const transferNotify = await addTransfer(_identifier, transfer)
|
const transferNotify = await addTransfer(_identifier, transfer)
|
||||||
emitNet(events.BANK_TRANSACTION_NOTIFICATION, targetSource, transferNotify)
|
emitNet(events.BANK_TRANSACTION_NOTIFICATION, xTarget, transferNotify)
|
||||||
emitNet(events.BANK_ADD_TRANSFER_SUCCESS, getSource());
|
emitNet(events.BANK_ADD_TRANSFER_SUCCESS, getSource());
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
emitNet(events.BANK_TRANSACTION_ALERT, getSource(), false)
|
emitNet(events.BANK_TRANSACTION_ALERT, getSource(), false)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import md5 from 'md5';
|
import md5 from 'md5';
|
||||||
|
|
||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { Message, MessageGroup, CreateMessageGroupResult } from '../../phone/src/common/interfaces/messages';
|
import { Message, MessageGroup, CreateMessageGroupResult } from '../../phone/src/common/typings/messages';
|
||||||
import { pool, withTransaction } from "./db";
|
import { pool, withTransaction } from "./db";
|
||||||
import { getSource, useIdentifier } from './functions';
|
import { getSource, useIdentifier } from './functions';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import events from "../utils/events";
|
import events from "../utils/events";
|
||||||
import { pool } from "./db";
|
import { pool } from "./db";
|
||||||
import { useIdentifier, getSource } from "./functions";
|
import { useIdentifier, getSource } from "./functions";
|
||||||
import { Note, NoteId } from "../../phone/src/common/interfaces/notes";
|
import { Note, NoteId } from "../../phone/src/common/typings/notes";
|
||||||
|
|
||||||
async function addNote(identifier: string, note: Note): Promise<any> {
|
async function addNote(identifier: string, note: Note): Promise<any> {
|
||||||
const query =
|
const query =
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import events from '../utils/events';
|
|||||||
import { ESX, getSource } from './server';
|
import { ESX, getSource } from './server';
|
||||||
import { pool } from './db';
|
import { pool } from './db';
|
||||||
import { useIdentifier } from './functions';
|
import { useIdentifier } from './functions';
|
||||||
import { IPhoto } from '../../phone/src/common/interfaces/photo';
|
import { IPhoto } from '../../phone/src/common/typings/photo';
|
||||||
|
|
||||||
async function uploadPhoto(identifier: string, image: string) {
|
async function uploadPhoto(identifier: string, image: string) {
|
||||||
const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
|
const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { pool } from "./db";
|
import { pool } from "./db";
|
||||||
import { ESX } from "./server";
|
import { ESX } from "./server";
|
||||||
import { getSource } from "./functions";
|
import { getSource } from "./functions";
|
||||||
import { Tweet, Profile } from '../../phone/src/common/interfaces/twitter';
|
import { Tweet, Profile } from '../../phone/src/common/typings/twitter';
|
||||||
import events from "../utils/events";
|
import events from "../utils/events";
|
||||||
import config from "../utils/config";
|
import config from "../utils/config";
|
||||||
import { reportTweetToDiscord } from './discord';
|
import { reportTweetToDiscord } from './discord';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import config from '../../config.json';
|
import config from '../../config.json';
|
||||||
import { ServerConfig } from '../../phone/src/common/interfaces/config';
|
import { ServerConfig } from '../../phone/src/common/typings/config';
|
||||||
|
|
||||||
export default <ServerConfig>config;
|
export default <ServerConfig>config;
|
||||||
Reference in new issue
Block a user