mariomari007   -  Jan 29, 2016

Need help with my twitch bot !addcom command, i am having an issue with permissions and was wondering if someone could help me with the permissions and getting the correct permissions for the command so normal users cant use the command.

example: !addcom !tweet Here is my twitter -> (twitter link)

i want to set it so i can have my mods only do the command and not normal chat members, here is the code if someone can recode it and reply with the updated code so i can be able to do !addcom !tweet and have it set to mods only (my mods in my chat bot system are level 3)

//---------------------------------------
// code
//---------------------------------------

on 3:text:!addCom*:#: {
var %commandName = $2
var %message = $replace($3-, $, @)
if (%message == $null) {
msg $chan /me You must have a command message.
return
}

if ($comAlreadyExists(%commandName) == $false && $left(%commandName, 1) == !) {
var %msgViability = $msgAlreadyExists(%message)
if (%msgViability == $false) {
writeini -n %commandFile $calc(%commandID + 1) name %commandName
writeini -n %commandFile $calc(%commandID + 1) message %message
writeini -n %commandFile $calc(%commandID + 1) permission *
inc %commandID
msg $chan /me The command %commandName has been added.
}
else {
msg $chan /me There is already a command ( $+ %msgViability $+ ) with the same message as %commandName $+ .
}
}
elseif ($comAlreadyExists(%commandName) == $false && $left(%commandName, 1) != !) {
msg $chan /me To add a command, it must start with !
}
else {
msg $chan /me The command %commandName already exists. Type !editCom [name] [new message] to edit it.
}
}

please help me

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.