Coder Social home page Coder Social logo

abhijith4124 / ahhh-bot Goto Github PK

View Code? Open in Web Editor NEW
15.0 5.0 3.0 106 KB

Ahhh Bot - Palworld Discord Bot | Whitelist | Join/Leave Messages | Automatic Roles and Announcement

JavaScript 99.90% Dockerfile 0.10%
bot discord discord-bot discord-js palworld palworld-bot palworld-discord-bot

ahhh-bot's Introduction

Logo

Ahhh Bot - Palworld Discord Bot | Whitelist | Join/Leave Messages | Automatic Roles and Announcement

AddBotToServer

AhhhBot is designed to enhance your Palworld gaming experience by allowing you to manage your Palworld Game Server directly through Discord. With a range of features including whitelisting, in-game join/leave messages, player management (ban, kick), and broadcast messaging capabilities, this bot streamlines server administration and communication for Palworld players.

Features

  • Whitelisting: Control access to your Palworld Game Server by managing whitelisted players directly from Discord.
  • Player Spoofing Prevention: Prevent hackers from pretending to be another player on your server.
  • Advanced Whitelisting: Whitelist Players on your server using thier SteamId, PlayerUid and even thier In Game Name to prevent any spoofing.
  • In-Game Join/Leave Messages: Keep track of player activity with automatic announcements when players join or leave your Palworld server.
  • Server Status Channel: Ability to setup a Server Status channel and the bot will automatically display the Current Server Status, Online Players, Max Player Count, Peak Player Count and a Player list.
  • Discord Game Log Channel: Ability to setup a Game Log channel for the bot to post Game Server logs like Player Join/Leave, Non Whitelisted Player being kicked, Player Whitelisted, etc.
  • Automatic Whitelist Announcement: The bot will automatically announce in the channel specified when a user has been whitelisted.
  • Automatic Discord Whitelist Role: Set the Role Id to be provided to the user when they are whitelisted.
  • Player Management: Easily ban or kick players from your Palworld Game Server using Discord commands.
  • Broadcast Messages: Send messages directly to your Palworld server for all players to see, facilitating server-wide communication.
  • PlayerUID and Steam ID Whitelisting: Support for both PlayerUID and Steam ID whitelisting, offering flexibility in player identification and management.

Screenshots

Welcome

Commands

Server Configuration

  • /serverconfig: Displays options to configure your Palworld Server within the Discord Server.
    • Configuration Options:
      • Gamelog Channel: Set a channel to receive game logs such as player join/leave events.
      • Status Channel: Set a channel for server status updates.
      • Whitelist Announcement Channel: Set a channel for whitelist announcements.
      • Whitelist Log Channel: Set a channel for whitelist logs.
      • Whitelist Role: Assign a role to whitelisted users.

Managing Palworld Servers

  • /addpalserver: Add a Palworld Server by providing server details.
  • /listpalservers: View the list of added Palworld Servers.
  • /removepalserver [server]: Remove a previously added Palworld Server.

Whitelisting Players

  • /whitelist [server] [enabled]: Enable or disable whitelist for a Palworld Server.
  • /addwhitelist [server] [steamid] [playeruid] [discorduser]: Add a player to the whitelist. Optionally, mention the Discord user for role assignment and announcement.
  • /removewhitelist [server] [playername] [discorduser]: Remove a player from the whitelist. Optionally, mention discord user to remove associated Discord roles.
  • -/linkwhitelist [server] [playername] [discorduser]: Links a Game Player to a Discord User, granting them Whitelist roles and Welcome message if specified.
  • -/unlinkwhitelist [server] [playername]: Unlinks a Game Player from a Discord User, removes thier Whitelist roles if specified.

Miscellaneous Commands

  • /save: Save the current Palworld game state.
  • /broadcast [server] [message]: Send a message to players on the Palworld Server.
  • /banplayer [server] [playersteamid]: Ban a player by their Steam ID.
  • /kickplayer [server] [playersteamid]: Kick a player by their Steam ID.

UI Options

Server Configuration

  • Configure Server Using the UI

Whitelist UI

  • Whitelist Player Straight from the log

Spoof Detection

  • Ban Detected Players Instantly with just a click!

ENV File

(Skip if you are using Docker) Create a .env File in the root directory.

DEBUG=false
TOKEN=
BOT_APPLICATION_ID=
CUSTOM_STATUS_MESSAGE=
STATUS_UPDATE_INTERVAL=10000
SERVER_POLLING_INTERVAL=5000

STATUS_UPDATE_INTERVAL: Interval for Updating Status Message in Discord.

SERVER_POLLING_INTERVAL: Interval for polling the PalWorld Game Server to fetch new data.

Installation and Deployment

Docker Method

Run a Docker Container using:

docker container run \
    --name ahhhbot \
    -d \
    -v <host_data_directory>:/app/data \
    -e DEBUG=false \
    -e TOKEN=<bot_token> \
    -e BOT_APPLICATION_ID=<bot_application_id> \
    -e CUSTOM_STATUS_MESSAGE="<custom_status_message>" \
    -e STATUS_UPDATE_INTERVAL=10000 \
    -e SERVER_POLLING_INTERVAL=5000 \
    abhi4124/ahhhbot:latest

Replace the values in <> with your own values.

Manual Method

Clone the repo or Download the Source as Zip.

Install the NPM Packages using:

  npm install

To run the Discord bot just start it using NodeJs:

node index.js

If you are deploying the bot on a server or hosting it locally, I would recommend using pm2 to start the node project.

Install PM2 if not installed already:

npm install pm2 -g

Start the Bot using:

pm2 start index.js

Roadmap

  • Easier Server Management Using UI within discord itself.

  • Player lists and player history tracking

Tech Stack

Server: NodeJS 20.11.0 LTS

License

MIT

ahhh-bot's People

Contributors

abhijith4124 avatar akiistaken avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

ahhh-bot's Issues

Docker for arm

Hi, can you please make docker digest support arm for self-hosted?

image

Just added bot to my server, used it a few times, then it stopped responding.

I had issues getting the correct info for /addpalserver to do its job (dathost doesn't like to do things normally) which resulted in the bot being unable to find my server several times. When I finally got the correct info I needed to input into the /addpalserver command prompt, the bot became unresponsive.

I kept getting the "The application did not respond" message.
I tried giving it the admin role directly, made no difference.
I kicked the bot, then re-invited it. Still unresponsive.

EDIT: To add that when typing / to queue up a /command, AHHBOT doesn't even pop up as an option anymore after kicking and re-inviting.

2nd EDIT: Just realized the bot is entirely "offline" instead of up with the other bots where it was when it was working. So i guess the bot is just offline.

Rate limit api ban

Hello, I think your bot is not designed for multiple servers.
I have now received a discord api ban because I exceeded 50 requests per second.

because discord has a rate limit of 50 requests.

How many requests does your bot send on 1 server?

it is not good

People log in with discord name

with the new update, sometimes some player get kicked because they logged on as their discord name, not their in game character name

Bot offline

The bot is showing as offline on my discord server, i tried to add it again. still doesnt work.

Any ideas?

When i run pm2 start index.js, i get the messaged errored when i type pm2 list, and its not using any memory so its not working, cant figure out why

cant add my server, idk why

this things is new for me, so maybe i do something wrong, pls help.
i already run the bot its online, i run the server using node js that i run in cmd just like the readme told me i install pm2 and run pm2 index.js, i already set the config file, the bot is online, i can run the command but the problem is when i try to add the server it always say it fail, maybe my server is the problem. but, when i use palbot. it can add the server and it work normaly. can anyone help me, thank u.
image
image

Just Steamid?

Hello

You can also set that you only need the steamid for the whitelist otherwise it would be too complicated.
Because we are a very large discord server

Because you only get the PlayerUID when it is on the server joint and that is too complicated for large discord servers

Suggestion: Playtime tracking & profile command

Add option for owner of the profile to do /profile to see their playtime on server. Track time start via join, Track time stop via leave or server crash or restart. Would be a good gauge to identify cheat players from their playtime too.

Scheduled server restarts with broadcast 5 min before restart, countdown broadcast till restart, in 1 min intervals.
A /broadcast and /shutdown command will do since a crash scheduler can be setup on the server manager to restart every time the process is down.

Failed To Add Server

It always says that, I have the server online on local pc.
Server Name : My server name
Server Host : 127.0.0.1
Server Port : 8211
RCON Port : 25575

Even on my hosted bot it keeps saying that.

More discord alerts

Awesome job on the bot. Very nice and professional. Thanks for fixing the latest update to work w/o whitelist.

Is it possible to add more alerts for discord? IE:

Treestyle shot Boar in the Body with their LR-300 Assault Rifle at a distance of 10.68 meters
Treestyle shot Scarecrow in the Head with their LR-300 Assault Rifle at a distance of 1.63 meters
Treestyle has just reached the rank of Airman

Levels ups, etc? This is nice to see what's going on in the game, etc. I have TRIBE LOGS plugins for ARK, etc.

Island [Day 1469][14:26]: Tribemember Slayer - Lvl 76 was killed by a Sabertooth - Lvl 168!
Tribe Logs
BOT
โ€” 02/24/2024 4:18 PM
Island [Day 1469][17:32]: GREYGHOST50 (0002dcb198cc4508a812b7eac1d628d1) left this ARK!
Tribe Logs
BOT
โ€” 02/24/2024 4:34 PM
[Svart](Tribe of Seren) [Day 1309][06:06]: Drixyr Tamed a Colossal Spice Lunar Kentrosaurus - Lvl 361 (Colossal Spice Lunar Kentrosaurus)!

This is a feature request, not issue. Thanks.

Leave message loop.

Hello! First of all, amazing job.
For some reason when i add a new server , it says "Failed To Add Server PALADIN. Check the Hostname and Port, also make sure the server is running... " even though it adds it and runs normally. 2nd issue is that the leave messages on restart of the server loop, if the server restarts, the bot will spam leave messages till i restart the bot.

image
this is the loop, the same people leaving over and over.

Whitelist VIA IP Address

People are able to spoof their SteamID's and access the server with allows cheaters to ruin things

Join/Leave logs and Server Status

After a few recent updates, the bot does not notify when a user Join/Leave the server.

Scenario 1:

Player connected to server then starting the bot, It will log that everyone left the server,

Scenario 2:

When bot is online, and players connect it will not log Join or Leave

Update ?

how do I update to the new version?

Cannot remove whitelist

the addwhitelist feature did work, but when i try to remove the whitelist, it said that Player is not whitelisted
Parameter playername doesnt show option, it only shows Loading Option Failed

This bot can no longer be used on our discord.

First of all, thank you for making this bot. I have invited this bot to our server, but when I type / not a single command appears from this bot. Even though it could be used before.

What name for .env file??

ENV File
(Skip if you are using Docker) Create a .env File in the root directory.
image

What name for .env file??

Suggestion

Hi,

So before i found this amazing bot i was using another one, the only thing i miss is the /online command, to list all the players currently on the server (ingame name , steamurl), would be possible to implement this?

edit: Nevermind. i see how server status works,

I got another suggestion, how about a welcome message? or set timed messages? so we could show the discord link or important messages from time to time?

thanks

Joined and left message BUG

ahhh bot
The images shows a player that connected. For some reason the Joined message is displayed twice and than a left message is also sent. In reality the player is online

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.