Git Product home page Git Product logo

palworld-tgbot's Introduction

Palworld-TgBot | Simple Functionality Bot for Palworld on Telegram

This bot implements basic Telegram bot functionalities, such as retrieving the list of online players, kicking, banning, unbanning players, and broadcasting messages to the entire server.

Feature Introduction

/start Start the bot
/auth Authenticate admin privileges
/kick Kick a player | Command format: /kick
/ban Ban a player | Command format: /ban
/unban Unban a player | Command format: /unban
/announce Broadcast to the server | Command format: /announce

Using Docker Container:

docker run -itd --name tg-bot \
 -e "TELEGRAM_BOT_TOKEN"="7042050000:AAG-gex61EsmnHp00VwgMw00EFol2xPGlzQ" \
 -e "ADMIN_PASSWORD"="demopassword" \
 -e "API_BASE_URL"="http://gameserver.ip:8212/v1/api" \
 -e "API_USERNAME"="admin" \
 -e "API_PASSWORD"="demo_rest_api_password" \
 imashen/palworld-tgbot:latest

ADMIN_PASSWORD is the password used to verify the /auth command, allowing the bot to authenticate and enable admin commands via private chat.
API_BASE_URL is the base URL for the server's RestAPI.
API_USERNAME defaults to admin.
API_PASSWORD is the RestAPI password set on your Palworld server.

Palworld-TgBot | 幻兽帕鲁Telegram简易功能机器人

实现简易的Telegram机器人功能,如获取在线玩家列表,踢出、封禁、解禁、全服广播内容等操作

功能介绍

/start 开始机器人
/auth 验证管理员权限
/kick 踢出玩家 | 命令格式:/kick <玩家ID> <原因>
/ban 封禁玩家 | 命令格式:/ban <玩家ID> <原因>
/unban 解禁玩家 | 命令格式:/unban <玩家ID>
/announce 全服广播 | 命令格式:/announce <播报消息>

Docker容器化使用:

docker run -itd --name tg-bot \
 -e "TELEGRAM_BOT_TOKEN"="7042050000:AAG-gex61EsmnHp00VwgMw00EFol2xPGlzQ" \
 -e "ADMIN_PASSWORD"="demopassword" \
 -e "API_BASE_URL"="http://gameserver.ip:8212/v1/api" \
 -e "API_USERNAME"="admin" \
 -e "API_PASSWORD"="demo_rest_api_password" \
 imashen/palworld-tgbot:latest

ADMIN_PASSWORD校验指令/auth时所用的密码,可以与机器人私聊来鉴权验证以使用管理员指令
API_BASE_URL服务器RestAPI总接口地址
API_USERNAME默认为admin
API_PASSWORD是你在palworld服务器中设定的RestAPI的密码

palworld-tgbot's People

Contributors

imashen avatar

Stargazers

Xia Deyuan 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.