Git Product home page Git Product logo

alexemanuelol / rustplusplus Goto Github PK

View Code? Open in Web Editor NEW
167.0 11.0 81.0 17.54 MB

A NodeJS Discord Bot that uses the rustplus.js library to utilize the power of the Rust+ Companion App with additional Quality-of-Life features.

License: GNU General Public License v3.0

JavaScript 99.47% Batchfile 0.14% Shell 0.13% TypeScript 0.22% Dockerfile 0.04%
bot commands discord events facepunch quality-of-life rust rustplus smart-devices javascript

rustplusplus's Introduction

discord reddit donate on ko-fi

donate on ko-fi

rustplusplus ~ Rust+ Discord Bot

A NodeJS Discord Bot that uses the rustplus.js library to utilize the power of the Rust+ Companion App with additional Quality-of-Life features.

How-to Setup Video

Image of setup video

Features

Documentation

Documentation can be found here. The documentation explains the features as well as how to setup the bot, so make sure to take a look at it ๐Ÿ˜‰

Credentials

You can get your credentials by running the rustplusplus FCM Credential Application. Download it here

How to run the bot

To run the bot, simply open the terminal of your choice and run the following from repository root:

$ npm start run

How to update the repository

Depending on your OS / choice of terminal you can run:

$ update.bat

or

$ ./update.sh

Running via docker

$ docker run --rm -it -v ${pwd}/credentials:/app/credentials -v ${pwd}/instances:/app/instances -v ${pwd}/logs:/app/logs -e RPP_DISCORD_CLIENT_ID=111....1111 -e RPP_DISCORD_TOKEN=token --name rpp ghcr.io/alexemanuelol/rustplusplus

or

$ docker-compose up -d

Make sure you use the correct values for DISCORD_CLIENT_ID as well as DISCORD_TOKEN in the docker command/docker-compose.yml

Thanks to

liamcottle@GitHub - for the rustplus.js library.
.Vegas.#4844@Discord - for the awesome icons!

rustplusplus's People

Contributors

alexemanuelol avatar faithix avatar jacubrstnc avatar jamezrin avatar pandeof1 avatar psykzz avatar simpyhub avatar squidysquid1 avatar trophy198 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rustplusplus's Issues

You can please add commands (!day) and (!night)

Good afternoon! Please add these two commands (!day) and (!night).
(!day) - time until the end of the day (remaining time until ~00:00).
(!night) - time until the end of the night (remaining time until ~07:00).
Thanks in advance.

Error: ENOENT: no such file or directory, open './src/resources/images/maps/1013878657959350352_map_clean.png

When I try to start the service after server reboot it doesn't work:

Error: ENOENT: no such file or directory, open './src/resources/images/maps/1013878657959350352_map_clean.png' at Object.openSync (node:fs:594:3) at Object.writeFileSync (node:fs:2207:35) at Map.writeMapClean (/home/rustplus/rustPlusPlus/src/structures/Map.js:252:18) at Map.resetImageAndMeta (/home/rustplus/rustPlusPlus/src/structures/Map.js:246:20) at new Map (/home/rustplus/rustPlusPlus/src/structures/Map.js:201:14) at Object.execute (/home/rustplus/rustPlusPlus/src/rustplusEvents/connected.js:48:28) at processTicksAndRejections (node:internal/process/task_queues:96:5) { errno: -2, syscall: 'open', code: 'ENOENT', path: './src/resources/images/maps/1013878657959350352_map_clean.png'

The files in this directory are:

rustplus@xxx:~/rustPlusPlus/src/resources/images/maps$ ls
1013878657959350352_map_clean.png 1013878657959350352_map_full.png 388411283105644555_map_clean.png 388411283105644555_map_full.png

Connection Error

It seems when playing any vital server (they change the team UI to 12) not sure if that would make a difference,

I connect the server. Initially on a fresh install of the bot it works. As soon as I add a smart switch, the connection instantly drops.
It spams this:

iMAGE

If you have any ideas, let me know!

map error

/root/rustPlusPlus/src/util/map.js:49
rustplus.map.monumentInfo[monument.token].radius) {
^

TypeError: Cannot read properties of undefined (reading 'radius')
at Object.getPos (/root/rustPlusPlus/src/util/map.js:49:63)
at MapMarkers.updateCargoShips (/root/rustPlusPlus/src/structures/MapMarkers .js:606:27)
at MapMarkers.updateMapMarkers (/root/rustPlusPlus/src/structures/MapMarkers .js:269:14)
at new MapMarkers (/root/rustPlusPlus/src/structures/MapMarkers.js:76:14)
at Object.pollingHandler (/root/rustPlusPlus/src/handlers/pollingHandler.js: 29:35)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

[Bug] Upkeep command

Hello !

Currently, commands upkeep didn't find any toolcupboard.

See PR for fixing it :)

Add ability to disable certain tracker notifications

It would be nice to disable certain notifications from the tracker tag such as "xx just died at xx" but still leave login notifications enabled.

Perhaps adding this to #settings menu or even as a simple slash command?

npm install fails

After commit 735d041 npm install fails and outputs Invalid Version: ^0.4.4.
This should be the package jpeg-js.

This is the important part of the log:
silly fetch manifest [email protected] 41 http fetch GET 200 https://registry.npmjs.org/jpeg-js 12ms (cache hit) 42 timing idealTree Completed in 132ms 43 timing command:install Completed in 142ms 44 verbose stack TypeError: Invalid Version: ^0.4.4 44 verbose stack at new SemVer (C:\Program Files\nodejs\node_modules\npm\node_modules\semver\classes\semver.js:38:13) 44 verbose stack at compare (C:\Program Files\nodejs\node_modules\npm\node_modules\semver\functions\compare.js:3:32) 44 verbose stack at Object.gte (C:\Program Files\nodejs\node_modules\npm\node_modules\semver\functions\gte.js:2:30) 44 verbose stack at CanPlaceDep.checkCanPlaceCurrent (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\can-place-dep.js:173:51) 44 verbose stack at CanPlaceDep.checkCanPlace (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\can-place-dep.js:157:27) 44 verbose stack at new CanPlaceDep (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\can-place-dep.js:114:26) 44 verbose stack at PlaceDep.place (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:121:19) 44 verbose stack at new PlaceDep (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:71:10) 44 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:984:31 44 verbose stack at Array.map (<anonymous>) 45 verbose cwd C:\Users\MyUser\Desktop\rustPlusPlus 46 verbose Windows_NT 10.0.22579 47 verbose node v18.0.0 48 verbose npm v8.6.0 49 error Invalid Version: ^0.4.4 50 verbose exit 1

Auto-ON/Auto-OFF delay for Smart Switches

Being able to turn on/off a smart switch for a few seconds (for instance, SAM sites) and then automatically turn back off/on.

Example:
!sam off 240s
!sam on 240s

Custom map = Not Working bot - Craash

Bot dont work on custom maps

"/root/rustPlusPlus/src/util/map.js:49
rustplus.map.monumentInfo[monument.token].radius) {
^

TypeError: Cannot read properties of undefined (reading 'radius')
at Object.getPos (/root/rustPlusPlus/src/util/map.js:49:63)
at Player.updatePos (/root/rustPlusPlus/src/structures/Player.js:85:28)
at new Player (/root/rustPlusPlus/src/structures/Player.js:21:14)
at Team.addPlayer (/root/rustPlusPlus/src/structures/Team.js:86:31)
at Team.updateTeam (/root/rustPlusPlus/src/structures/Team.js:58:22)
at new Team (/root/rustPlusPlus/src/structures/Team.js:14:14)
at Object.pollingHandler (/root/rustPlusPlus/src/handlers/pollingHandler.js:28:29)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Node.js v17.3.1
"

any fix ?

[Issue] Bot Crashing after a couple hours

After running for a couple hours, the bot is shutting itself down with this error:

Click to Expand Node.js Error Message
/home/ssyl/gitrepos/rustPlusPlus/node_modules/discord.js/src/rest/RequestHandler.js:201                                                                                                                                                                                                                              [124/1378]
        throw new HTTPError(error.message, error.constructor.name, error.status, request);
              ^

HTTPError [FetchError]: request to https://discord.com/api/v9/channels/961495849475649617/messages/964844716850036756 failed, reason: read ECONNRESET
    at RequestHandler.execute (/home/ssyl/gitrepos/rustPlusPlus/node_modules/discord.js/src/rest/RequestHandler.js:201:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/ssyl/gitrepos/rustPlusPlus/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
    at async MessageManager.edit (/home/ssyl/gitrepos/rustPlusPlus/node_modules/discord.js/src/managers/MessageManager.js:132:15)
    at async Object.updateMapInformation (/home/ssyl/gitrepos/rustPlusPlus/src/handlers/informationHandler.js:75:13)
    at async Object.handler (/home/ssyl/gitrepos/rustPlusPlus/src/handlers/informationHandler.js:19:13) {
  code: 500,
  method: 'patch',
  path: '/channels/961495849475649617/messages/964844716850036756',
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: 0,
      message_reference: undefined,
      attachments: [ { id: '0', description: undefined } ],
      sticker_ids: undefined
    },
    files: [
      {
        attachment: 'src/resources/images/maps/961160341285388328_map_full.png',
        name: '961160341285388328_map_full.png',
        file: ReadStream {
          fd: null,
          path: '/home/ssyl/gitrepos/rustPlusPlus/src/resources/images/maps/961160341285388328_map_full.png',
          flags: 'r',
          mode: 438,
          start: undefined,
          end: Infinity,
          pos: undefined,
          bytesRead: 6911744,
          closed: true,
          _readableState: ReadableState {
            objectMode: false,
            highWaterMark: 65536,
            buffer: [BufferList],
            length: 0,
            pipes: [],
            flowing: true,
            ended: true,
            endEmitted: true,
            reading: false,
            constructed: true,
            sync: false,
            needReadable: false,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            destroyed: true,
            errored: null,
            closed: true,
            closeEmitted: true,
            defaultEncoding: 'utf8',
            awaitDrainWriters: null,
            multiAwaitDrain: false,
            readingMore: false,
            dataEmitted: true,
            decoder: null,
            encoding: null,
            [Symbol(kPaused)]: false
          },
          _events: [Object: null prototype] { error: [Array], data: [Array] },
          _eventsCount: 2,
          _maxListeners: undefined,
          emit: [Function (anonymous)],
          [Symbol(kFs)]: {
            appendFile: [Function: appendFile],
            appendFileSync: [Function: appendFileSync],
            access: [Function: access],
            accessSync: [Function: accessSync],
            chown: [Function: chown],
            chownSync: [Function: chownSync],
            chmod: [Function: chmod],
            chmodSync: [Function: chmodSync],
            close: [Function: close],
            closeSync: [Function: closeSync],
            copyFile: [Function: copyFile],
            copyFileSync: [Function: copyFileSync],
            cp: [Function: cp],
            cpSync: [Function: cpSync],
            createReadStream: [Function: createReadStream],
            createWriteStream: [Function: createWriteStream],
            exists: [Function: exists],
            existsSync: [Function: existsSync],
            fchown: [Function: fchown],
            fchownSync: [Function: fchownSync],
            fchmod: [Function: fchmod],
            fchmodSync: [Function: fchmodSync],
            fdatasync: [Function: fdatasync],
            fdatasyncSync: [Function: fdatasyncSync],
            fstat: [Function: fstat],
            fstatSync: [Function: fstatSync],
            fsync: [Function: fsync],
            fsyncSync: [Function: fsyncSync],
            ftruncate: [Function: ftruncate],
            ftruncateSync: [Function: ftruncateSync],
            futimes: [Function: futimes],
            futimesSync: [Function: futimesSync],
            lchown: [Function: lchown],
            lchownSync: [Function: lchownSync],
            lchmod: undefined,
            lchmodSync: undefined,
            link: [Function: link],
            linkSync: [Function: linkSync],
            lstat: [Function: lstat],
            lstatSync: [Function: lstatSync],
            lutimes: [Function: lutimes],
            lutimesSync: [Function: lutimesSync],
            mkdir: [Function: mkdir],
            mkdirSync: [Function: mkdirSync],
            mkdtemp: [Function: mkdtemp],
            mkdtempSync: [Function: mkdtempSync],
            open: [Function: open],
            openSync: [Function: openSync],
            opendir: [Function: opendir],
            opendirSync: [Function: opendirSync],
            readdir: [Function: readdir],
            readdirSync: [Function: readdirSync],
            read: [Function: read],
            readSync: [Function: readSync],
            readv: [Function: readv],
            readvSync: [Function: readvSync],
            readFile: [Function: readFile],
            readFileSync: [Function: readFileSync],
            readlink: [Function: readlink],
            readlinkSync: [Function: readlinkSync],
            realpath: [Function],
            realpathSync: [Function],
            rename: [Function: rename],
            renameSync: [Function: renameSync],
            rm: [Function: rm],
            rmSync: [Function: rmSync],
            rmdir: [Function: rmdir],
            rmdirSync: [Function: rmdirSync],
            stat: [Function: stat],
            statSync: [Function: statSync],
            symlink: [Function: symlink],
            symlinkSync: [Function: symlinkSync],
            truncate: [Function: truncate],
            truncateSync: [Function: truncateSync],
            unwatchFile: [Function: unwatchFile],
            unlink: [Function: unlink],
            unlinkSync: [Function: unlinkSync],
            utimes: [Function: utimes],
            utimesSync: [Function: utimesSync],
            watch: [Function: watch],
            watchFile: [Function: watchFile],
            writeFile: [Function: writeFile],
            writeFileSync: [Function: writeFileSync],
            write: [Function: write],
            writeSync: [Function: writeSync],
            writev: [Function: writev],
            writevSync: [Function: writevSync],
            Dir: [class Dir],
            Dirent: [class Dirent],
            Stats: [Function: Stats],
            ReadStream: [Getter/Setter],
            WriteStream: [Getter/Setter],
            FileReadStream: [Getter/Setter],
            FileWriteStream: [Getter/Setter],
            _toUnixTimestamp: [Function: toUnixTimestamp],
            F_OK: 0,
            R_OK: 4,
            W_OK: 2,
            X_OK: 1,
            constants: [Object: null prototype],
            promises: [Getter]
          },
          [Symbol(kIsPerformingIO)]: false,
          [Symbol(kCapture)]: false
        }
      }
    ]
  }
}

Smart switches

Can you please add the ability to use one command for multiple switches. For example, I am building a small base with turrets around the house and I want to open them all with one command. Or turn off and turn on all SAMs at once.

Support for voice

Make it possible for the bot to join voice chat and notify events/alarms/other notifications.

Error: Cannot find module 'node:events'

`npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@discordjs/[email protected]',
npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=7.0.0' },
npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@discordjs/[email protected]',
npm WARN EBADENGINE required: { node: '>=16.0.0' },
npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=16.6.0', npm: '>=7.0.0' },
npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@discordjs/[email protected]',
npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=7.0.0' },
npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@discordjs/[email protected]',
npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=7.0.0' },
npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' }
npm WARN EBADENGINE }

up to date, audited 210 packages in 2s

12 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
`

`F:\rust\rustPlusPlus>node index.js
internal/modules/cjs/loader.js:883
throw err;
^

Error: Cannot find module 'node:events'
Require stack:

  • F:\rust\rustPlusPlus\node_modules\discord.js\src\client\BaseClient.js
  • F:\rust\rustPlusPlus\node_modules\discord.js\src\index.js
  • F:\rust\rustPlusPlus\index.js
    โ†[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)โ†[39m
    โ†[90m at Function.Module._load (internal/modules/cjs/loader.js:725:27)โ†[39m
    โ†[90m at Module.require (internal/modules/cjs/loader.js:952:19)โ†[39m
    โ†[90m at require (internal/modules/cjs/helpers.js:88:18)โ†[39m
    at Object. (F:\rust\rustPlusPlus\node_modules\โ†[4mdiscord.jsโ†[24m\src\client\BaseClient.js:3:22)
    โ†[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)โ†[39m
    โ†[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)โ†[39m
    โ†[90m at Module.load (internal/modules/cjs/loader.js:928:32)โ†[39m
    โ†[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)โ†[39m
    โ†[90m at Module.require (internal/modules/cjs/loader.js:952:19)โ†[39m {
    code: โ†[32m'MODULE_NOT_FOUND'โ†[39m,
    requireStack: [
    โ†[32m'F:\rust\rustPlusPlus\node_modules\discord.js\src\client\BaseClient.js'โ†[39m,
    โ†[32m'F:\rust\rustPlusPlus\node_modules\discord.js\src\index.js'โ†[39m,
    โ†[32m'F:\rust\rustPlusPlus\index.js'โ†[39m
    ]
    }`

edit: updating nodejs in progress..

questions

how use this command /credentials set ? whats โ€‹keys_private_key,โ€‹keys_auth_secret,etc...
and i can use bot in multiple rust servers and discord servers ?

bug

add if (!message.member.hasPermission("ADMINISTRATOR")) return message.reply(You do not have ADMINISTRATOR permission to use this command!); to reset command beacuse everyone in guild can reset bot settings

Blink/Flash/Pattern for switches

After going through line and line of code, I could not figure out the best way to make this happen. For example, I wanted to make a custom command for !{switchname} strobe {secs between on/off} {optional: how long to keep flashing}

Is this possible? Or because of the discord button integration, it is limited?

8 vulnerabilities (6 moderate, 1 high, 1 critical)

npm i return:
`~/rustPlusPlus$ npm i

up to date, audited 286 packages in 7s

19 packages are looking for funding
run npm fund for details

8 vulnerabilities (6 moderate, 1 high, 1 critical)

To address all issues, run:
npm audit fix

Run npm audit for details.
:~/rustPlusPlus$ npm audit fix

up to date, audited 286 packages in 3s

19 packages are looking for funding
run npm fund for details

npm audit report

jpeg-js <=0.4.3
Severity: high
Uncontrolled resource consumption in jpeg-js - GHSA-w7q9-p3jq-fmhm
Infinite loop in jpeg-js - GHSA-xvf7-4v9q-58w6
fix available via npm audit fix
node_modules/jpeg-js
@jimp/jpeg <=0.12.0
Depends on vulnerable versions of jpeg-js
node_modules/@jimp/jpeg
@jimp/types <=0.11.1-canary.891.908.0
Depends on vulnerable versions of @jimp/jpeg
node_modules/@jimp/types
jimp 0.3.6-alpha.5 - 0.11.1-canary.891.908.0
Depends on vulnerable versions of @jimp/custom
Depends on vulnerable versions of @jimp/types
node_modules/jimp

minimist <=1.2.5
Severity: critical
Prototype Pollution in minimist - GHSA-xvch-5gv4-984h
Prototype Pollution in minimist - GHSA-vh95-rmgr-6w4m
fix available via npm audit fix
node_modules/minimist
mkdirp 0.4.1 - 0.5.1
Depends on vulnerable versions of minimist
node_modules/mkdirp
@jimp/core <=0.9.6-canary.860.700.0
Depends on vulnerable versions of mkdirp
node_modules/@jimp/core
@jimp/custom <=0.8.6-canary.818.495.0 || 0.9.2-canary.815.538.0 - 0.9.3-canary.825.599.0 || 0.9.4-canary.832.606.0 - 0.9.4-canary.845.627.0 || 0.9.6-canary.857.681.0 - 0.9.6-canary.860.700.0
Depends on vulnerable versions of @jimp/core
node_modules/@jimp/custom

8 vulnerabilities (6 moderate, 1 high, 1 critical)`

npm 8.13.2
node v18.6.0
debian bulleyes

bot crash

/root/rustPlusPlus/node_modules/discord.js/src/rest/RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);
^

DiscordAPIError: Invalid Form Body
embeds[0].fields[0].value: Must be 1024 or fewer in length.
at RequestHandler.execute (/root/rustPlusPlus/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/root/rustPlusPlus/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async TextChannel.send (/root/rustPlusPlus/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:175:15)
at async sendInformationEmbed (/root/rustPlusPlus/src/inGameEvents/information.js:316:9) {
method: 'post',
path: '/channels/946242935995908127/messages',
code: 50035,
httpStatus: 400,
requestData: {
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [

Connect to Rust server

I don't know how to connect Rustplusplus bot to my rust server. Unfortunately, I couldn't find this information in the "Readme".

Add Prefix

Add prefix like !help to use the bot not only SlashCommands

Support raid alarms from Rust plugin "Raid Alarm"

This plugin is used on for instance "EU RENEGADE 2x Monthly Main | 50% Upkeep | Noob Friendly"
Plugin: https://umod.org/plugins/raid-alarm

If an entity of your base gets destroyed, it will notify.

NOTIFICATION:
{
"data":{
"experienceId":"@facepunch/RustCompanion",
"scopeKey":"@facepunch/RustCompanion",
"title":"You're getting raided!",
"message":"chair destroyed at N18",
"body":"{"img":"https:\/\/cdn.discordapp.com\/attachments\/804553969085972481\/970612217697423420\/Untitled_Artwork.png","port":"28017","ip":"45.88.230.46","name":"EU RENEGADE 2x Monthly Main | 50% Upkeep | Noob Friendly |","logo":"1","id":"407d552e-c1be-49ef-be41-84d374fda0f0","url":"https:\/\/store.renegaderust.com","desc":"===Welcome to EU RenegadeRust.com 2x Monthly Main===\\n Map wipes monthly on the 1st Thursday of the month @ 2 PM EST (No BP Wipe)\\n VIP PERKS - https:\/\/www.RenegadeRust.com\\n DISCORD - https:\/\/discord.gg\/renegaderust\\n\\n ===KEY FEATURES===\\n -PLAY TO WIN - Earn points for playtime to purchase FREE VIP\\n -RAID ALARM - Alerts you via Rust+ when your base is damaged\\n -Best Admins in the game including CAMOMO_10\\n -50% Upkeep\\n -Some mini helis and boats spawn\\n -Extra recyclers at dome, oilrig, fishing, and c"}",
"projectId":"49451aca-a822-41e6-ad59-955718d0ff9c",
"channelId":"alarm"
},
"from":"976529667804",
"priority":"high",
"fcmMessageId":"50d87cdd-4f4b-4e18-823f-2327139366d8"
}

Bot crashing

Hi! My bot is crashing once I pair the bot with the server.

This is all I got on the console:

2022-5-13 21:45:53 INFO: LOGGED IN AS: rustPlusPlus#5381
2022-5-13 21:45:54 143428962834448386 Intoxicated EU Sandbox - Creative | Build | Noclip CONNECTING: RUSTPLUS CONNECTING...
2022-5-13 21:45:54 824117831901642766 Intoxicated EU Sandbox - Creative | Build | Noclip CONNECTING: RUSTPLUS CONNECTING...
2022-5-13 21:45:54 143428962834448386 Intoxicated EU Sandbox - Creative | Build | Noclip CONNECTED: RUSTPLUS CONNECTED
2022-5-13 21:45:54 824117831901642766 Intoxicated EU Sandbox - Creative | Build | Noclip CONNECTED: RUSTPLUS CONNECTED
2022-5-13 21:45:54 INFO: Successfully registered application commands for guild: 824117831901642766.
2022-5-13 21:45:55 INFO: FCM-listener will start in 5 seconds for guild: 824117831901642766
2022-5-13 21:46:03 FCM: 824117831901642766 pairing: server
2022-5-13 21:46:07 ERROR: Invalid guild or channel.
2022-5-13 21:46:07 143428962834448386 Intoxicated EU Sandbox - Creative | Build | Noclip CONNECTED: SUCCESSFULLY CONNECTED!
2022-5-13 21:46:07 ERROR: sendServerMessage: Invalid guild or channel.
2022-5-13 21:46:10 143428962834448386 Intoxicated EU Sandbox - Creative | Build | Noclip EVENT: Cargo Ship located at Q0.
2022-5-13 21:46:10 143428962834448386 Intoxicated EU Sandbox - Creative | Build | Noclip EVENT: Cargo Ship located at AK36.
2022-5-13 21:46:10 ERROR: Invalid guild or channel.
2022-5-13 21:46:10 ERROR: Invalid guild or channel.
2022-5-13 21:46:10 ERROR: Invalid guild or channel.
2022-5-13 21:46:10 ERROR: Invalid guild or channel.
2022-5-13 21:46:11 ERROR: Message send failed: DiscordAPIError: Request entity too large
/home/rust/rustPlusPlus/src/rustplusEvents/connected.js:77
                instance.informationMessageId.map = msg.id;
                                                        ^

TypeError: Cannot read properties of undefined (reading 'id')
    at Object.execute (/home/rust/rustPlusPlus/src/rustplusEvents/connected.js:77:57)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.1.0

Currently using Ubuntu 20.04.4 LTS

Bradley APC null before respawn.

The timer for Bradley's respawn appears to not be getting set, funnily enough if you run the command to check the timer it does return.

image

[Suggestion] More Options for Trademark

I actually like the idea of the trademark/bit prefix before messages, but I find "rustPlusPlus | " before every message a little too cumbersome.

Would it be possible to add additional options such as:

[Rust++], RPP, etc.

In addition maybe add the option to choose wether it's separated by a pipe, brackets, or a semi colon or something like that?

- Battlemetrics Player Tracker 'xxx' does not exist.

When trying to add a new player tracker, no matter what the bot returns that it doesn't exist
/tracker add_player tracker_name:(tracker name) steam_id:(steam id) returns:
Battlemetrics Player Tracker 'name' does not exist.

npm ERR! Invalid Version: ^0.4.3

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:D:\server\rustPlusPlus-master\rustPlusPlus.npmrc Completed in 1ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\CZAK_Games.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\CZAK_Games\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 7ms
19 timing npm:load:configload Completed in 7ms
20 timing npm:load:mkdirpcache Completed in 0ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm install
23 verbose argv "install"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 3ms
26 timing npm:load:display Completed in 4ms
27 verbose logfile logs-max:10 dir:C:\Users\CZAK_Games\AppData\Local\npm-cache_logs
28 verbose logfile C:\Users\CZAK_Games\AppData\Local\npm-cache_logs\2022-08-07T19_26_21_024Z-debug-0.log
29 timing npm:load:logFile Completed in 4ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 17ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile start cleaning logs, removing 2 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 145ms
37 timing idealTree:userRequests Completed in 0ms
38 silly idealTree buildDeps
39 timing idealTree:#root Completed in 0ms
40 silly fetch manifest [email protected]
41 http fetch GET 200 https://registry.npmjs.org/jpeg-js 996ms (cache revalidated)
42 timing idealTree Completed in 1147ms
43 timing command:install Completed in 1158ms
44 verbose stack TypeError: Invalid Version: ^0.4.3
44 verbose stack at new SemVer (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules\semver\classes\semver.js:38:13)
44 verbose stack at compare (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules\semver\functions\compare.js:3:32)
44 verbose stack at Object.gte (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules\semver\functions\gte.js:2:30)
44 verbose stack at CanPlaceDep.checkCanPlaceCurrent (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\can-place-dep.js:173:51)
44 verbose stack at CanPlaceDep.checkCanPlace (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\can-place-dep.js:157:27)
44 verbose stack at new CanPlaceDep (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\can-place-dep.js:114:26)
44 verbose stack at PlaceDep.place (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\place-dep.js:123:19)
44 verbose stack at new PlaceDep (C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\place-dep.js:73:10)
44 verbose stack at C:\Users\CZAK_Games\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:990:31
44 verbose stack at Array.map ()
45 verbose cwd D:\server\rustPlusPlus-master\rustPlusPlus
46 verbose Windows_NT 10.0.19044
47 verbose node v16.16.0
48 verbose npm v8.16.0
49 error Invalid Version: ^0.4.3
50 verbose exit 1
51 timing npm Completed in 1277ms
52 verbose unfinished npm timer reify 1659900381143
53 verbose unfinished npm timer reify:loadTrees 1659900381150
54 verbose unfinished npm timer idealTree:buildDeps 1659900381296
55 verbose unfinished npm timer idealTree:node_modules/@jimp/jpeg 1659900381297
56 verbose code 1
57 error A complete log of this run can be found in:
57 error C:\Users\CZAK_Games\AppData\Local\npm-cache_logs\2022-08-07T19_26_21_024Z-debug-0.log

suggestion

try to make bot multi discord and rust servers like dont make user connect with src/external but try to add web dashboard to everyone can access to bot and pair steam with dashboard

The shops

First, could you please add an alert for new open stores instead of open empty stores?
Secondly, is there a team to search for items for sale? (for example, I want to know if anyone sells workbench 3, if so, for what)

Bot crashing

Hi! My bot crashed this morning with the next error (while we were getting raided ๐Ÿ™ƒ):

2022-9-04 02:39:18 143428962834448386 CENSOREDSERVERNAME ERROR: Response contain error property with value: not_found. /home/rust/rustPlusPlus/src/discordTools/discordEmbeds.js:236 title: ${instance.serverList[serverId][type][entityId].name}, ^ TypeError: Cannot read properties of undefined (reading 'undefined') at Object.getNotFoundSmartDeviceEmbed (/home/rust/rustPlusPlus/src/discordTools/discordEmbeds.js:236:52) at Object.sendSmartSwitchMessage (/home/rust/rustPlusPlus/src/discordTools/discordMessages.js:74:31) at Object.handler (/home/rust/rustPlusPlus/src/handlers/smartSwitchHandler.js:22:47) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5)

Starting the bot again ends in crashing instantly with a very similar error but with an extra line at the end:

2022-9-04 07:19:46 143428962834448386 CENSOREDSERVERNAME CONNECTED: SUCCESSFULLY CONNECTED! 2022-9-04 07:19:47 143428962834448386 CENSOREDSERVERNAME ERROR: Response contain error property with value: not_found. /home/rust/rustPlusPlus/src/discordTools/discordEmbeds.js:236 title: ${instance.serverList[serverId][type][entityId].name}, ^ TypeError: Cannot read properties of undefined (reading 'undefined') at Object.getNotFoundSmartDeviceEmbed (/home/rust/rustPlusPlus/src/discordTools/discordEmbeds.js:236:52) at Object.sendSmartSwitchMessage (/home/rust/rustPlusPlus/src/discordTools/discordMessages.js:74:31) at module.exports (/home/rust/rustPlusPlus/src/discordTools/SetupSwitches.js:32:31) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.execute (/home/rust/rustPlusPlus/src/rustplusEvents/connected.js:129:9)

Running on Ubuntu server 20.04 with NodeJS v16.17.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.