Exiled-Team / DiscordIntegration

GNU General Public License v3.0
13 stars 37 forks source link

Connection Refused Again... #84

Closed Lazyas closed 2 years ago

Lazyas commented 2 years ago

So i created the bot and it works well this is the console and config of the bot:

CONSOLE: container@pterodactyl~ Server marked as running... v17.8.0 :/home/container$ if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install --production; fi; bash --rcfile <(echo 'export RUN_CMD="/usr/local/bin/node /home/container/'${BOT_JS_FILE}' &"; eval $(echo $RUN_CMD)')

up to date, audited 29 packages in 1s

2 packages are looking for funding run npm fund for details

found 0 vulnerabilities I have no name!@0a93c386-677f-4669-a834-9b2b9e6a04e5:~$ [BOT][INFO] Loading configs... [BOT][INFO] Configs loaded successfully. [BOT][INFO] Loading synced roles... [BOT][INFO] Synced roles loaded successfully. [DISCORD][INFO] Logging in... [DISCORD][INFO] Successfully logged in as Realm Community#0783. [NET][INFO] Starting server at 127.0.0.1:28010... [NET][INFO] Server successfully started at 127.0.0.1:28010.

CONFIG:

Bot commands prefix

prefix: "+"

channels:

Channels to log various kind of messages in.

log:

List of channels to log commands in.

commands:
  - "900412785480040458"
# List of channels to log game events in.
game_events:
  - "900412785480040458"
# List of channels to log bans in.
bans:
  - "900412785480040458"
reports:
  - "859354343706591242"

Channel to which the topic will be changed.

topic:

List of roles and commands they can use.

commands: "role-1":

Discord server configs.

discord_server:

Discord server ID.

id: "796454994643124305"

TCP server configs.

tcp_server:

TCP server port.

port: 28010

TCP server IP address.

ip_address: "127.0.0.1"

Internal keep alive of a connected client, in milliseconds.

keep_alive_interval: 2000

Messages delay, in milliseconds

messages_delay: 100

Indicates whether the debug is enabled or not.

is_debug_enabled: false

But the scp server is not connecting to bot it keep saying this: [2022-04-12 11:34:05.642 +03:00] [WARN] [DiscordIntegration] [NET] Connecting to 127.0.0.1:28010. [2022-04-12 11:34:05.671 +03:00] [ERROR] [DiscordIntegration] [NET] An error has occurred while connecting: Connection refused

image

I tried to enable firewall but nah nothing...

Lazyas commented 2 years ago

oh and yes i am using pterodactly and not running in the same machine

joker-119 commented 2 years ago

You need to either run the bot and server in the same pterodactyl container, or on completely separate machines. if using separate machines, set the ip in the bot's config to 0.0.0.0 and in the plugin's config set it to the public IP of the machine running the bot.

Also please learn how to use code blocks on github because that was painful to read your config.