GithubHelp home page GithubHelp logo

beexd / pterodactyl-status-to-discord Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 5.0 98 KB

Posts The server status from pterocyadl panel to discord webhook

JavaScript 18.91% TypeScript 81.09%
discord pterodactyl pterodactyl-panel-api

pterodactyl-status-to-discord's Introduction

Pterodactyl-status-to-discord

Posts The server status from Pterodactyl panel to discord webhook

NOTE- If You dont understand this version, you can switch back to old version HERE

Requirements

Installation

Clone the repository git clone https://github.com/BeeXD/pterodactyl-status-to-discord cd pterodactyl-status-to-discord

Then write npm install

Now The Node Package Manager should install dependencies.

Getting a Api Key

  • Go to your Pterodactyl panel.
  • Move to your Account settings. Here
  • Write a description then allow your ip or you can leave it blank for global access.
  • Now an Api Key should generate. Keep it private and secure.
  • Go to .env and replace the text PANEL_TOKEN with the api key.
  • Now it should look like this.
PANEL_TOKEN=aetkAaETukhaEG135136aey

Getting server id

  • Go to your console of Pterodactyl panel.
  • The Link should be like this https://yourWebsite.com/server/031afba1 replace yourWebsite.com with your domain.
  • The 031afba1 is your server id.
  • Go to your .env File.
  • On Line 3, Replace SERVER_ID= to SERVER_ID=SERVERID.
  • *ps Replace SERVERID with your server id.

Setting up a Discord Webhook

  • Make a webhook in a channel and copy the link
  • Replace WEBHOOK_URL= to WEBHOOK_URL=YOUR-URL

Running the File

  • node index.js , Now using the cron module the file will send the stats every 1 minute.

Screenshots

ss

Support

  • Free free to contribute and develop the small project
  • Any errors please make a issue.

Thank You! <3

Contributors

Thanks To contributors

A big thanks to lying who helped me in this

pterodactyl-status-to-discord's People

Contributors

beexd avatar lyingnet avatar zooomaa avatar

Stargazers

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

Watchers

 avatar

pterodactyl-status-to-discord's Issues

Weird error throwing whilst trying to setup

node:internal/deps/undici/undici:16289
Error.captureStackTrace(err, this);
^

TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:16289:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fetch (/root/pterodactyl-status-to-discord/node_modules/@sapphire/fetch/dist/cjs/index.cjs:130:18)
at async getData (/root/pterodactyl-status-to-discord/index.js:8:20) {
cause: Error: getaddrinfo ENOTFOUND https
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'https'
}
}

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.