Code Monkey home page Code Monkey logo

Comments (5)

vincss avatar vincss commented on August 10, 2024 1

On se base sur une librairie externe pour BedRock et le développement n'est pas encore aussi avancé que la librairie java
https://www.npmjs.com/package/@jsprismarine/prismarine

Si une màj sort, on alignera le fonctionnement. :-)

from mcsleepingserverstarter.

iwa avatar iwa commented on August 10, 2024

hey! thanks for the issue
that's actually a nice idea, i'm gonna work on that this week 😉

from mcsleepingserverstarter.

Rysanlos avatar Rysanlos commented on August 10, 2024

Hello, I just noticed something:
If it's a bedrock client who is waking up the server, it does not say the nickname, just "A Bedrock Player", it's completely defeating the webhook feature, is it possible to know what bedrock player like on java? (I'm using geyser so I have bedrock players and java players.
image

from mcsleepingserverstarter.

 avatar commented on August 10, 2024

I haven't used typescript before, but I hope you can add a way to send a message when the server is listening for users to join. I know its not quite related to this issue but that would actually be awesome.

from mcsleepingserverstarter.

Reishimanfr avatar Reishimanfr commented on August 10, 2024

Hello, I would like to be able to edit the webhook message in the settings instead to have to edit the whole code. Here what I edited to be exactly to my liking on "sleepingDiscord.ts":

    onPlayerLogging = async (playerName: string) => {
        const content = `{
            "content": null,
            "embeds": [
              {
                "description": "${playerName} a réveillé le serveur Minecraft, démarrage en cours...",
                "color": 65280
              }
            ],
            "username": "Minecraft"
        }`;
        await this.sendMessage(content, true);

    }

    onServerStop = async () => {
        const content = `{
            "content": null,
            "embeds": [
              {
                "description": "Le serveur est vide, arrêt en cours...",
                "color": 16711680
              }
            ],
            "username": "Minecraft"
        }`;
        await this.sendMessage(content, false);
    }
}

The avatar is already defined on the webhook settings inside of Discord, same for the username but I edited here to not break the code. I changed the color, and instead of "title" I used "description" because I don't want the message to be bold. I'm using a plugin to send message when the server is started, here the result: image Translation:

* Player waked-up the server, starting...

* Server started

I did the same for shutting down the server, but it's doing doublons so I want to be able to disable onServerStop, I tried to remove the code block but npm start won't start saying onServerStop is missing. I hope you see the idea what we should be able to edit directly in "sleepingSettings.yml".

Thank you!

@vincss Hi there
I'm sorry if this is the wrong place to do this kind of stuff, I'm new to github and still learning how stuff works
would it be okay if I tried to make this feature a thing?
if you want you can just add me on discord to discuss everything there instead of here to not spam the issue (my tag is Rėi#0090)

from mcsleepingserverstarter.

Related Issues (20)

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.