Giter Site home page Giter Site logo

palworld-discord-bot's Introduction

Palworld Discord BOT

Palworld Icon
Palworld Discord

한국어 | English


Install

  1. Go to the Release page and download the file that matches your operating system.
  2. To fully utilize the bot's features, you need to run it in the same location as your Palworld server.
  3. Run the downloaded file.
    • When you run it, you will see the following screen. Select your language.
      image
    • After selecting the language, you will see the following screen. Enter the highlighted address in your browser.
      image
  4. When you enter the address in your browser, you will see the following screen. Configure it and restart.
    image

Setup Instructions

  1. Change the value of RCONEnabled to True in the PalworldSettings.ini file.
    • You can also run !palbot serverSettings RCONEnabled true in Discord after running the bot.
  2. Change the value of AdminPassword in the PalworldSettings.ini file.
    • You can also run !palbot serverSettings AdminPassword <new password> in Discord after running the bot.
  3. Restart the Palworld server.
  4. Check the "Enable Palworld RCON" section on http://localhost:60000 or change the value of PALWORLD_RCON_ENABLED to true in the .env file.
  5. Change the "Palworld Admin Password" section on http://localhost:60000 or change the value of PALWORLD_ADMIN_PASSWORD in the .env file.

Features

Feature Description Image
Internationalization Supports Korean (ko) and English (en).
Connected User Dashboard Displays a list of users connected to the server. It automatically updates when there are changes in the user list. image
User Connection Notification Sends a message to the log channel when a user connects or disconnects from the server. image
Commands Administrators can manage the server using commands. Typing !palbot or !palbot help will display the usage. image
kick (Admin Only) Kicks a user from the server. They can reconnect afterwards. image
ban (Admin Only) Bans a user from the server. They cannot reconnect.
broadcast (Admin Only) Sends a message to the server. Currently, only English is supported. Reference image
shutdown (Admin Only) Shuts down the server. image
doExit (Admin Only) Forces the server to exit. image
save (Admin Only) Saves the server.
startServer (Admin Only) Starts the server. (Windows: C:\Program Files (x86)\Steam\steamapps\common\PalServer\PalServer.exe, Linux: ~/Steam/steamapps/common/PalServer/PalServer.sh) image
serverSettings (Admin Only) Changes the server settings. image

Caution

  • Currently, Palworld does not support Non-ASCII characters when sending messages via RCON. You can only use languages other than English. Reference
  • When sending messages with spaces, Palworld's RCON cuts off the message. Therefore, spaces are replaced with underscores when transmitted. (broadcast, shutdown commands)

palworld-discord-bot's People

Contributors

juunini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

palworld-discord-bot's Issues

안녕하세요 마이너에서 보고 생각보다 편하게 셋팅했습니다.

팰월드 때문에 우분투 공부하면서 친구들과 서버를 꾸려 하나씩 이것 저것 해보고 있습니다.

정리도 너무 잘해주시고 못쓰고 있던 RCON까지 활용하게 되었습니다 !

무한한 감사를 드립니다.

제가 지금 서버를 다른 곳에 우분투를 두고 집에서 Putty를 이용하거나 집에서 MSTSC(터미널)를 이용해서 작업중인데 제가 잘못해서 Putty와 MSTSC(터미널)중복 실행을 해버리고 나니 웹페이지에서 수정을 해도 .env파일이 수정되지 않았습니다. 제가 잘 몰라서 그런건지 모르겠지만 .env파일을 아예 삭제해서 새로 셋팅하니 멀쩡해졌습니다 ! 원래 이런거면 별문제 없이 기쁘게 쓸 것 같습니다 ㅎㅎ

개발 노고에 대해 너무 감사드립니다.

항상 건강하세요~

Help 명령어만 가능한 문제

Screenshot_20240229_135406_Discord
Help만 명령어로 받고 다른 명령어는 알수없다고 뜹니다.
리눅스 버전을 사용했으며, 어제 윈도우에서 테스트할때도 똑같은 결과가 나왔던것으로 기억합니다.
+대/소문자를 가리지 말라고 설정핬는데 가리는것같습니다.

.env

WEB_SERVER_ENABLED=true
WEB_SERVER_PORT=60000

DISCORD_BOT_ENABLED=true
DISCORD_BOT_TOKEN=******
DISCORD_ADMIN_USERNAMES=Ash
DISCORD_COMMAND_CASE_SENSITIVE=false
DISCORD_COMMAND_PREFIX=까부냥!

PALWORLD_RCON_ENABLED=true
PALWORLD_RCON_HOST=127.0.0.1
PALWORLD_RCON_PORT=25575
PALWORLD_ADMIN_PASSWORD=******
PALWORLD_SERVER_FILE_PATH=/home/serverfile/palworld/PalServer.sh
PALWORLD_SERVER_EXECUTE_FLAGS=-useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -rcon

DISCORD_DASHBOARD_CHANNEL_ID=1212408110962970634
DISCORD_LOG_CHANNEL_ID=1212408110962970634
DISCORD_DASHBOARD_PALWORLD_CONFIG_MESSAGE_ID=
DISCORD_DASHBOARD_ONLINE_PLAYERS_MESSAGE_ID=
DISCORD_DASHBOARD_BOT_CONFIG_MESSAGE_ID=

DISCORD_COMMAND_ALIAS_HELP=help
DISCORD_COMMAND_ALIAS_KICK=kick
DISCORD_COMMAND_ALIAS_BAN=ban
DISCORD_COMMAND_ALIAS_BROADCAST=broadcast
DISCORD_COMMAND_ALIAS_SHUTDOWN=shutdown
DISCORD_COMMAND_ALIAS_DO_EXIT=doExit
DISCORD_COMMAND_ALIAS_SAVE=save
DISCORD_COMMAND_ALIAS_START_SERVER=startServer

LANGUAGE=ko

무엇이 문제인지 한 번 확인 해주시면 감사하겠습니다.

Error connecting to 127.0.0.1:25575 - dial tcp 127.0.0.1:25575: connect: connection refused

image

실행 시 위와 같은 문제가 발생합니다.
ubuntu22.04 vm 인스턴스를 사용하고 있으며 서버와 봇을 실행시키는 서버가 같습니다.
.env 파일을 수정하는 방법으로 적용했습니다.

.env

WEB_SERVER_ENABLED=false
# 웹 서버의 포트를 설정합니다. 되도록 60000 이상의 숫자를 사용하시길 권장합니다.
WEB_SERVER_PORT=60000

DISCORD_BOT_ENABLED=true
# 디스코드 봇의 토큰을 입력하세요. 토큰을 얻는 방법은 https://github.com/juunini/palworld-discord-bot/wiki/How-to-create-Discord-Bot%3F-%5B%ED%95%9C%EA%B5%AD%EC%96%B4%5D 를 참고하세요.
DISCORD_BOT_TOKEN=*******
# 관리자의 '디스코드 닉네임'을 입력하세요. 여러명일 경우 쉼표로 구분합니다.
DISCORD_ADMIN_USERNAMES=Ash
# 디스코드 커맨드의 대소문자를 구분할지 설정합니다.
DISCORD_COMMAND_CASE_SENSITIVE=false
# 디스코드 봇 호출 명령어를 설정합니다.
DISCORD_COMMAND_PREFIX=까부냥!

# PalWorldSettings.ini의 RCONEnable 값을 미리 true로 설정해주세요.
PALWORLD_RCON_ENABLED=true
# 팰월드 서버가 실행된 서버의 주소를 입력하세요.
PALWORLD_RCON_HOST=127.0.0.1
# PalWorldSettings.ini 파일에 설정된 RCONPort 값을 입력하세요. (포트포워딩이나 리버스 프록시를 이용해 변경하셨으면 해당 포트를 입력하세요.)
PALWORLD_RCON_PORT=25575
# PalWorldSettings.ini 파일에 설정된 AdminPassword 값을 입력하세요.
PALWORLD_ADMIN_PASSWORD=ash1324
# 팰월드 서버가 실행된 파일의 경로를 입력하세요.
PALWORLD_SERVER_FILE_PATH=/home/serverfile/palworld/PalServer.sh
# 팰월드 서버가 실행될 때 사용할 플래그를 입력하세요.
PALWORLD_SERVER_EXECUTE_FLAGS=-useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -rcon

# 대시보드 기능을 이용하기 위한 채널 ID를 입력하세요. 입력하지 않으면 해당 기능을 사용하지 않습니다. 채널 ID를 확인하는 방법은 https://github.com/juunini/palworld-discord-bot/wiki/How-to-get-Channel-ID%3F-%5B%ED%95%9C%EA%B5%AD%EC%96%B4%5D 를 참고하세요.
DISCORD_DASHBOARD_CHANNEL_ID=1212408110962970634
# 유저의 접속/종료 기록을 확인하기 위한 채널 ID를 입력하세요. 입력하지 않으면 해당 기능을 사용하지 않습니다. 채널 ID를 확인하는 방법은 https://github.com/juunini/palworld-discord-bot/wiki/How-to-get-Channel-ID%3F-%5B%ED%95%9C%EA%B5%AD%EC%96%B4%5D 를 참고하세요.
DISCORD_LOG_CHANNEL_ID=1212408110962970634
# 자동으로 설정되는 값입니다. 필요한 경우가 아니라면 수정하지 마세요.
DISCORD_DASHBOARD_PALWORLD_CONFIG_MESSAGE_ID=
# 자동으로 설정되는 값입니다. 필요한 경우가 아니라면 수정하지 마세요.
DISCORD_DASHBOARD_ONLINE_PLAYERS_MESSAGE_ID=
# 자동으로 설정되는 값입니다. 필요한 경우가 아니라면 수정하지 마세요.
DISCORD_DASHBOARD_BOT_CONFIG_MESSAGE_ID=

# 도움말을 표시하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_HELP=help
# 유저를 1회 강퇴하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_KICK=kick
# 유저를 차단하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_BAN=ban
# 모든 유저에게 메시지를 전송하는 커맨드를 커스텀 합니다. (영어만 가능)
DISCORD_COMMAND_ALIAS_BROADCAST=broadcast
# 서버를 일정 시간 후 종료하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_SHUTDOWN=shutdown
# 서버를 강제 종료하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_DO_EXIT=doExit
# 서버를 저장하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_SAVE=save
# 서버를 실행하는 커맨드를 커스텀 합니다.
DISCORD_COMMAND_ALIAS_START_SERVER=startServer

LANGUAGE=ko

docker-compose.yml

---
services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    restart: unless-stopped
    container_name: palworld-server
    stop_grace_period: 30s  # Set to however long you are willing to wait for the container to gracefully stop
    ports:
      - 8211:8211/udp
      - 25575:25575/tcp
      - 27015:27015/udp  # Required if you want your server to show up in the community servers tab
    environment:
      PUID: 1000
      PGID: 1000
      PORT: 8211  # Optional but recommended
      PLAYERS: 2  # Optional but recommended
      SERVER_PASSWORD: "******"  # Optional but recommended
      MULTITHREADING: true
      RCON_ENABLED: true
      RCON_PORT: 25575
      TZ: "KR"
      ADMIN_PASSWORD: "******"
      COMMUNITY: false  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
      SERVER_NAME: "palworld-server-docker by Thijs van Loef"
      SERVER_DESCRIPTION: "palworld-server-docker by Thijs van Loef"
      PAL_EGG_DEFAULT_HATCHING_TIME : 2
      BACKUP_ENABLED : true
      BACKUP_CRON_EXPRESSION : 0 2 * * *
      DELETE_OLD_BACKUPS : true
      OLD_BACKUP_DAYS : 10
      UPDATE_ON_BOOT : true
      DISABLE_GENERATE_ENGINE : true
      AUTO_UPDATE_ENABLED : true
      AUTO_REBOOT_ENABLED : true
      AUTO_REBOOT_CRON_EXPRESSION : 0 3 * * *
      AUTO_REBOOT_WARN_MINUTES : 3
      DISCORD_WEBHOOK_URL : ******
      ENABLE_PLAYER_LOGGING : true
    volumes:
      - ./palworld:/palworld/

도커 컨테이너가 제공하는 디스코드 웹훅/rcon은 잘 작동하는 것을 확인하였습니다.
관련해서 수정해 볼 것이 있을까요?
좋은 기능 개발해주셔서 감사합니다.

Palworld config edit feature

under is DefaultPalWorldSettings.ini file's content

; This configuration file is a sample of the default server settings.
; Changes to this file will NOT be reflected on the server.
; To change the server settings, modify Pal/Saved/Config/WindowsServer/PalWorldSettings.ini.
[/Script/Pal.PalGameWorldSettings]
OptionSettings=(Difficulty=None,DayTimeSpeedRate=1.000000,NightTimeSpeedRate=1.000000,ExpRate=1.000000,PalCaptureRate=1.000000,PalSpawnNumRate=1.000000,PalDamageRateAttack=1.000000,PalDamageRateDefense=1.000000,PlayerDamageRateAttack=1.000000,PlayerDamageRateDefense=1.000000,PlayerStomachDecreaceRate=1.000000,PlayerStaminaDecreaceRate=1.000000,PlayerAutoHPRegeneRate=1.000000,PlayerAutoHpRegeneRateInSleep=1.000000,PalStomachDecreaceRate=1.000000,PalStaminaDecreaceRate=1.000000,PalAutoHPRegeneRate=1.000000,PalAutoHpRegeneRateInSleep=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=1.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=1.000000,DeathPenalty=All,bEnablePlayerToPlayerDamage=False,bEnableFriendlyFire=False,bEnableInvaderEnemy=True,bActiveUNKO=False,bEnableAimAssistPad=True,bEnableAimAssistKeyboard=False,DropItemMaxNum=3000,DropItemMaxNum_UNKO=100,BaseCampMaxNum=128,BaseCampWorkerMaxNum=15,DropItemAliveMaxHours=1.000000,bAutoResetGuildNoOnlinePlayers=False,AutoResetGuildTimeNoOnlinePlayers=72.000000,GuildPlayerMaxNum=20,PalEggDefaultHatchingTime=72.000000,WorkSpeedRate=1.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=32,ServerName="Default Palworld Server",ServerDescription="",AdminPassword="",ServerPassword="",PublicPort=8211,PublicIP="",RCONEnabled=False,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

hard backup feature

  • turn off server (or check server is down)
  • .../PalServer/Pal/Saved/SaveGames/0 gzip and name to timestamp(YYYY-mm-DDTHH:MM:SS.tgz)

에러 문의

디코봇 쓰려고 설정 중인데요

일단 서버는 서버용 PC에 WindowsGSM 사용해서 만들었습니다.
만들어주신 디코봇 깔고 설정 하고 실행하면 아래와 같이 메세지 나옵니다.

�[1;31mRCON 서버에 연결하는데 실패했습니다.: Error connecting to 182.228.233.87:25575 - dial tcp 182.228.233.87:25575: i/o timeout�[0m
�[1;31mRCON 서버에 연결하는데 실패했습니다.�[0m

디코에 일단 디코봇 입장까진 됐고, 도움말 출력은 되는데 서버 시작이나 등등 명령어 넣으면 "RCON 서버에 연결하는데 실패했습니다. "라는 메세지 나오고 안됩니다.

세팅 파일에서 Rcon True로 바꿔 줬고, 디코봇 설정에서 Rcon host에 제 공인 IP, 내부망 ip, 127.0.0.1 셋다 넣어도 똑같습니다.
포트포워딩으로 25575 TCP,UDP 둘다 열어 줬습니다.

왜 그럴까요

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.