(uptime) - Remove the auto tag sender

PhantomBot Version: 3.0.0
OS Version: Mac OS X 10.13.4 (x86_64)
Java Version: 1.8.0_211-b12
Browser and Version (for Panel Support):1.0.0
Stock PhantomBot: Yes

Let us know what help you need: When i use the (uptime) variable it automatically includes the (sender) which i would like it to removed, i have found the section in customCommands.js where it has it but i am unsure on what to type in where it would remove the sender info but continue to run the uptime.

I have updated the !uptime command to only include (uptime) but it still shows the sender

need assistance removing the

$.say($.userPrefix(event.getSender(), true)

while still being able to run uptime with no errors

Here is the section of the js

if (message.match(/(uptime)/g)) {
if (!$.isOnline($.channelName)) {
$.say($.userPrefix(event.getSender(), true) + $.lang.get(‘timesystem.uptime.offline’, $.channelName));
return null;
message = $.replace(message, ‘(uptime)’, String($.getStreamUptime($.channelName)));

As you indicated, just remove the userPrefix:

$.say($.lang.get('timesystem.uptime.offline', $.channelName));

Thank you,
That did work, i thought i tried that but didn’t realized i left out the “(” after “$.say” but once i added that back in as you did above it worked perfect

1 Like

No worries, I sometimes lose track of the number of parenthesis as well at times, happens to everyone at times :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.