Coder Social home page Coder Social logo

tabo-syu / parl Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

Parl adds commands to the Discord server to control PalServer-Linux, Palworld's game server.

License: MIT License

Go 100.00%
discord discord-bot discordgo go golang palworld palworld-server slash-commands

parl's Introduction

Parl

Parl は Palworld のゲームサーバーである PalServer-Linux を操作するコマンドを Discord サーバーに追加します。 /parl は、ゲームサーバーの起動、停止、状態確認を行えます。

  • /parl status: Palworld ゲームサーバーの状態を確認します。
  • /parl start: Palworld ゲームサーバーを起動します。
  • /parl stop: Palworld ゲームサーバーを停止します。

不意に停止したゲームサーバーの起動を Discord サーバーに参加しているメンバーに任せることができるようになります。

導入手順

環境

  • 必須
  • 推奨

Bot の作成

  1. Discord Developer Portal を開きます。
  2. 「New Application」 から Bot を作成します。
  3. Bot タブを開き、「Reset Token」から Token を発行し、控えます。
  4. 「PUBLIC BOT」のチェックを外します。
  5. OAuth2 > URL Generator から 招待 URL を作成します。
    • SCOPES: bot, application.commands
    • BOT PERMISSIONS: Send Messages, Embed Links
  6. 生成した URL へ遷移し、サーバーへ Bot を追加します。

Bot の起動

  1. git clone https://github.com/tabo-syu/parl.git && cd ./parl を実行します。
  2. cp .env.example .env を実行します。
  3. 好きなエディタで .env ファイルを開き、各項目を埋めます。
    • DISCORD_ICON_URL: 送信されるメッセージに付与される画像の URL
    • DISCORD_TOKEN: 「Bot の作成」で控えた Token
    • RCON_HOST: ゲームサーバーの IP アドレス
    • RCON_PORT: PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini で設定したゲームサーバーのポート番号
    • RCON_PASSWORD: PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini で設定したパスワード
    • SERVER_PATH: PalServer/PalServer.sh のパス
  4. screen を実行後、task run で Bot が起動します。
  5. Ctrl + a > d でセッションから抜けます。

EN

Translated by DeepL.

Parl adds commands to the Discord server to control PalServer-Linux, Palworld's game server. /parl can start, stop, and check the status of the game server.

  • /parl status: Checks the status of the Palworld game server.
  • /parl start: Starts the Palworld game server.
  • /parl stop: Stop the Palworld game server.

This allows a member of the Discord server to start up a game server that has been stopped unexpectedly.

Installation

Requirements

  • required
  • recommend

Create a Bot

  1. Open the Discord Developer Portal.
  2. Create a Bot from "New Application".
  3. Open the Bot tab, issue a Token from "Reset Token", and copy the Token.
  4. Uncheck "PUBLIC BOT".
  5. Create an invitation URL from OAuth2 > URL Generator.
    • SCOPES: bot, application.commands
    • BOT PERMISSIONS: Send Messages, Embed Links
  6. Go to the generated URL and add the Bot to the server.

Start Bot

  1. Execute git clone https://github.com/tabo-syu/parl.git && cd . /parl.
  2. Execute cp .env.example .env.
  3. Open the .env file in your favorite editor and fill in each item.
    • DISCORD_ICON_URL: URL of the image to be attached to the message to be sent.
    • DISCORD_TOKEN: The Token that you have taken down in the "Creating a Bot" section.
    • RCON_HOST: IP address of the game server
    • RCON_PORT: Port number of the game server set in PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
    • RCON_PASSWORD: Password set in PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
    • SERVER_PATH: Path to PalServer/PalServer.sh
  4. After screen is executed, task run will start the Bot.
  5. Ctrl + a > d to exit from the session.

parl's People

Contributors

tabo-syu avatar

Watchers

 avatar

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.