Commands using points to be free for subscribers


Hi, I would like to make a suggestion at the behest of IllusoryOne ( who responded to my support thread)

As the title I would like a command or a setting to make certain commands in the bot to be free for my subscribers, as I would like to reward people more. Outside of just the typical things I can do.


I just saw someone with another bot that has this feature. I think it would be amazing to be able to tick a box to exclude subs from pricing (or set a different price for subs)


Think it’d be cool if you could do it on select commands, but I know that’d take more work. I just see it being an issue when it comes to point-gaining commands like the games.

If !slot has a min payout of 20, and a max payout of 50, but costs 15 points to use, that means a user will win 5-35 points at max. That also means whenever they lose, they lose points, and if they keep losing, they can’t do the command anymore. This kind of control is another “restriction” kind of like the cooldowns. Not only that, it helps prevent users from gaining a mass amount of points uncontested.

Remove those limitations, and a user can go from 50 points to 50k in a very short time. This happens a lot with gambling, since you can double your points (if you win), and is why gambling gets restricted in a lot of streams.


I totally agree, and I’ve been trying find a workaround but I’m so unskilled at this it’s pathetic. I really only want to use it for things like songrequest. I tried making a custom command that would be sub permission that would get phantombot to make the request for them, but either it’s not possible or I’m doing something very wrong. And regardless of their own permissions, aliases inherit the permission of the original command so I can’t even make it so even if the original command costs 100 points, the sub only alias would pay 100. -___-


update: got the custom command to work right, but it still checks the permission level of songrequest, even passing it through the bot…


I know this is a neat feature, but it also slows down the processing of commands. If we add this option for subscribers, chances are that a lot of people will want it for other permissions as well. Currently all commands go through the same check for costs, permissions, cooldowns, and aliases. Other bots might do it differently which makes it easier for them to add this feature for specific modules like songrequests.

Unfortunately, this isn’t an easy process for us since everything uses the same check whiting the code. Hopefully you understand. :slight_smile:


makes perfect sense to me. Would it be easier/more viable to have aliases/custom commands that call other commands only look at their own permission so that what I tried to do above would work and essentially do the same thing as excluding subs?


Aliases call the root command in the end, they go through the main event. Anything starting with an ! in chat goes through the command parser, then we make sure the command or alias exists, if the command is an aliases, we get the command assigned to the alias.

$api.on($script, 'command', function(event) {
            var sender = event.getSender(),
                command = event.getCommand(),
                args = event.getArgs(),
                subCommand = $.getSubCommandFromArguments(command, args),
                isMod = $.isModv3(sender, event.getTags());

            // Check if the command exists or if the module is disabled.
            if (!$.commandExists(command) || !isModuleEnabled($.getCommandScript(command))) {
            } else 

            // Check if the command has an alias.
            if ($.aliasExists(command)) {
                var alias = $.getIniDbString('aliases', command),
                    aliasArguments = '';

                if (alias.indexOf(';') === -1) {
                    var parts = alias.split(' ', 2);

                    $, parts[0], ((parts[1] !== undefined ? parts[1] : '') + ' ' + args.join(' ')), event.getTags());
                } else {
                    var parts = alias.split(';');

                    for (var i = 0; i < parts.length; i++) {
                        command = parts[i].split(' ');

                        $, command[0], ((command[1] !== undefined ? command[1] : '') + ' ' + args.join(' ')), event.getTags());
            } else 

            // Check the command permission.
            if ($.permCom(sender, command, subCommand) !== 0) {
                $.sayWithTimeout($.whisperPrefix(sender) + $.lang.get('cmd.perm.404', (!$.subCommandExists(command, subCommand) ? $.getCommandGroupName(command) : $.getSubCommandGroupName(command, subCommand))), $.getIniDbBoolean('settings', 'permComMsgEnabled', false));
            } else 

            // Check the command cooldown.
            if ($.coolDown.get(command, sender, isMod) !== 0) {
                $.sayWithTimeout($.whisperPrefix(sender) + $.lang.get('init.cooldown.msg', command, $.coolDown.getSecs(sender, command)), $.getIniDbBoolean('settings', 'coolDownMsgEnabled', false));
            } else 

            // Check the command cost.
            if ($.priceCom(sender, command, subCommand, isMod) !== 0) {
                $.sayWithTimeout($.whisperPrefix(sender) + $.lang.get('cmd.needpoints', $.getPointsString($.getCommandPrice(command, subCommand, ''))), $.getIniDbBoolean('settings', 'priceComMsgEnabled', false));

            // Call the command function.
            callHook('command', event, false);


Good information. :+1: