Deep Bot - Twitch Streamer Assistant
Deep Bot => Help/Support => Topic started by: RDBGaming on January 24, 2017, 05:16:28 PM
-
Hi everybody,
So i want some custom commands in my bot, but i need to check on some things.
If the target is not empty and after that is the user exist.
Now i have some setup but it fails after the user exist check.
If the target is empty it gives the message fine, but after that it should check if the user exist but its not.
!hug
@if@[@target@||||@user@ You must name a target for you to hug!||!hug_2 @target@]
!hug_2
@if@[@target@||User not found||@user@ sorry but that is not a valid user||!hug_3 @target@]
!hug_3
GivePLZ @user@ Gives @target@ a BIG HUG TakeNRG
Can anyone help me with this ?
Regards,
RDBGaming
-
!hug_2, will not be able to check if the user is a user. There really is no variable to grab/see if a user exists.
Basically how !hug_2 works, is it will check if @target@ is "User not found", meaning if Username=User Not found, then send message @user@ sorry but that is not a valid user.
My guess is you are trying to see @target@ from !hug is a real user, and if they are a real user, go to !hug_3. If not, say @user@ sorry but that is not a valid user.
What you could do is this for !hug_2:
@if@[@lookupinfo@[@l_lastseen@,@target@]||@l_lastseen@||@user@ sorry but that is not a valid user||!hug_3 @target@]
(http://i.imgur.com/WUS8n9l.png)
In case you want to import what I have, here is the Commands Import JSON code:
[{
"command": "!hug",
"group": "Hug",
"status": true,
"runAsBot": false,
"runAsUserElevated": true,
"startsWithEx": false,
"message": "@if@[@target@||||@user@ You must name a target for you to hug!||!hug_2 @target@]",
"description": "",
"lastUsed": "2017-01-24T19:00:46.272097-07:00",
"cooldown": 0,
"accessLevel": 1,
"soundFile": "",
"costEnabled": false,
"minPoints": 0,
"minHours": 0,
"costAll": 0,
"costVIPViewer": 0,
"costVIPB": 0,
"costVIPS": 0,
"costVIPG": 0,
"costVIPMod": 0,
"costVIPStreamer": 0,
"OnScreenWidgetEnabled": false,
"OnScreenWidgetName": "",
"OnScreenWidgetTitle": "",
"OnScreenWidgetMessage": "",
"OnScreenWidgetImageLink": "",
"OnScreenWidgetAnimMode": 0,
"OBSRemoteEnabled": false,
"OBSRemoteAction": 0,
"OBSRemoteSceneName": "",
"CommandChaningCmdName": "",
"CommandChaningRunAfter": 0,
"CommandChaningRunAsAdmin": false,
"VIPModEnabled": false,
"VIPModIfViewer": 0,
"VIPModIfVIPB": 0,
"VIPModIfVIPS": 0,
"VIPModIfVIPG": 0,
"VIPModAddDays": 30,
"countdown": "2017-01-24T18:50:01.2537606-07:00",
"counter": 9,
"APITarget": false,
"hideFromCmdList": false,
"accessDeniedMsg": "",
"noPointsMsg": "",
"disableChanAccess": false,
"disableWhisperAccess": false,
"disableDiscordAccess": false,
"isSoundVolumeSet": true,
"soundVolume": 100
},
{
"command": "!hug_2",
"group": "Hug",
"status": true,
"runAsBot": false,
"runAsUserElevated": true,
"startsWithEx": false,
"message": "@if@[@lookupinfo@[@l_lastseen@,@target@]||@l_lastseen@||@user@ sorry but that is not a valid user||!hug_3 @target@]",
"description": "",
"lastUsed": "2017-01-24T19:00:46.272097-07:00",
"cooldown": 0,
"accessLevel": 1,
"soundFile": "",
"costEnabled": false,
"minPoints": 0,
"minHours": 0,
"costAll": 0,
"costVIPViewer": 0,
"costVIPB": 0,
"costVIPS": 0,
"costVIPG": 0,
"costVIPMod": 0,
"costVIPStreamer": 0,
"OnScreenWidgetEnabled": false,
"OnScreenWidgetName": "",
"OnScreenWidgetTitle": "",
"OnScreenWidgetMessage": "",
"OnScreenWidgetImageLink": "",
"OnScreenWidgetAnimMode": 0,
"OBSRemoteEnabled": false,
"OBSRemoteAction": 0,
"OBSRemoteSceneName": "",
"CommandChaningCmdName": "",
"CommandChaningRunAfter": 0,
"CommandChaningRunAsAdmin": false,
"VIPModEnabled": false,
"VIPModIfViewer": 0,
"VIPModIfVIPB": 0,
"VIPModIfVIPS": 0,
"VIPModIfVIPG": 0,
"VIPModAddDays": 30,
"countdown": "2017-01-24T18:50:10.2652557-07:00",
"counter": 3,
"APITarget": false,
"hideFromCmdList": false,
"accessDeniedMsg": "",
"noPointsMsg": "",
"disableChanAccess": false,
"disableWhisperAccess": false,
"disableDiscordAccess": false,
"isSoundVolumeSet": true,
"soundVolume": 100
},
{
"command": "!hug_3",
"group": "Hug",
"status": true,
"runAsBot": false,
"runAsUserElevated": true,
"startsWithEx": false,
"message": "GivePLZ @user@ Gives @target@ a BIG HUG TakeNRG",
"description": "",
"lastUsed": "2017-01-24T19:00:46.272097-07:00",
"cooldown": 0,
"accessLevel": 1,
"soundFile": "",
"costEnabled": false,
"minPoints": 0,
"minHours": 0,
"costAll": 0,
"costVIPViewer": 0,
"costVIPB": 0,
"costVIPS": 0,
"costVIPG": 0,
"costVIPMod": 0,
"costVIPStreamer": 0,
"OnScreenWidgetEnabled": false,
"OnScreenWidgetName": "",
"OnScreenWidgetTitle": "",
"OnScreenWidgetMessage": "",
"OnScreenWidgetImageLink": "",
"OnScreenWidgetAnimMode": 0,
"OBSRemoteEnabled": false,
"OBSRemoteAction": 0,
"OBSRemoteSceneName": "",
"CommandChaningCmdName": "",
"CommandChaningRunAfter": 0,
"CommandChaningRunAsAdmin": false,
"VIPModEnabled": false,
"VIPModIfViewer": 0,
"VIPModIfVIPB": 0,
"VIPModIfVIPS": 0,
"VIPModIfVIPG": 0,
"VIPModAddDays": 30,
"countdown": "2017-01-24T18:50:20.4773355-07:00",
"counter": 2,
"APITarget": false,
"hideFromCmdList": false,
"accessDeniedMsg": "",
"noPointsMsg": "",
"disableChanAccess": false,
"disableWhisperAccess": false,
"disableDiscordAccess": false,
"isSoundVolumeSet": true,
"soundVolume": 100
}]
Guide on Importing commands: http://wiki.deepbot.tv/import_and_export_commands
-
@RepentGamingTV
Works great, that was the thing i ment.