Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Discord:
- Youtube
- Discord Tag: xquab
- Variables necesarias:
- Nombre: premium
- Valor: {"valor": "false", "tiempo": "86400"}
- 1.- Code
- Prefix: !add-premium(opcional)
- Ejecuta:
- !add-premium <user> <tiempo>(opcional)
- !add-premium xquab 3d
- Posdata, Tiempo:
- d = dia
- h = hora
- m = minuto
- s = segundos
- Codigo:
- $nomention
- $c[dar premium]
- $var[us;$findUser[$message[1];no]]
- $if[$checkUserPerms[$var[us];admin]==false]
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[Debe tener "admin" para hacer esto.]
- $color[c13849]
- $stop
- $endif
- $if[$message[2]==]
- $var[k;$calculate[(86400+$getTimestamp)]]
- $else
- $try
- $onlyIf[$checkContains[$message[2];s;m;h;d]==true;]
- $catch
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[Por favor usa **(s) segundos**, **(m) minutos**, **(h) horas**, **(d) dias**.]
- $color[c13849]
- $stop
- $endtry
- $if[$isNumber[$replaceText[$replaceText[$replaceText[$replaceText[$message[2];s;;-1];m;;-1];h;;-1];d;;-1]]==false]
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[Numero ingresado: ($message[2]), no
- valido intenta otra vez.]
- $color[c13849]
- $stop
- $endif
- $if[$checkContains[$message[2];s]==true]
- $var[o;$replaceText[$message[2];s;]]
- $var[k;$sum[$getTimestamp;$var[o]]]
- $elseif[$checkContains[$message[2];m]==true]
- $var[o;$replaceText[$message[2];m;]]
- $var[k;$calculate[($var[o]*60)+$getTimestamp]]
- $elseif[$checkContains[$message[2];h]==true]
- $var[o;$replaceText[$message[2];h;]]
- $var[k;$calculate[($var[o]*3600)+$getTimestamp]]
- $elseif[$checkContains[$message[2];d]==true]
- $var[o;$replaceText[$message[2];d;]]
- $var[k;$calculate[((($var[o]*24)*60)*60)+$getTimestamp]]
- $endif
- $endif
- $if[$userExists[$var[us]]==true]
- $jsonParse[$getVar[premium;$mentioned[1]]]
- $jsonSetString[valor;true]
- $jsonSetString[tiempo;$var[k]]
- $author[$username[$var[us]]]
- $authorIcon[$userAvatar[$var[us]]]
- $description[Excelente le has dado Premium a <@$var[us]> ⭐️]
- $addField[ID:;
- $var[us]]
- $addField[Expira:;
- <t:$var[k]:F>]
- $addField[Mod:;
- <@$authorID>]
- $setVar[premium;$jsonStringify;$var[us]]
- $color[#2eb969]
- $else
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[El usuario no existe]
- $color[c13849]
- $stop
- $endif
- 2.- Code
- Posdata: Puden usar esto en todos sus codes para que se requiera premium etc,
- Prefix: !premium(opcional)
- Codigo:
- $nomention
- $c[usar premium]
- $var[id;$findUser[$message[1];yes]]
- $jsonParse[$getVar[premium;$var[id]]]
- $if[$json[valor]==true]
- $if[$json[tiempo]>=$getTimestamp]
- $c[⬇️ rempplazar aqui lo q ira si tiene premium ⬇️]
- $description[Tienes premium]
- $color[#2eb969]
- $c[⬆️ remplazar aqui lo q ira si tiene premium ⬆️]
- $else
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[Se te acabo el premium <t:$json[tiempo]:R> precisamente]
- $color[c13849]
- $stop
- $endif
- $else
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[No tiene premium <@$var[id]>]
- $color[c13849]
- $stop
- $endif
- 3.- Code
- Prefix: !quitar-premium(opcional)
- Ejecuta asi:
- !quitar-premium <user>
- Codigo:
- $nomention
- $var[es;$findUser[$message[1];no]]
- $jsonParse[$getVar[premium;$var[es]]]
- $if[$checkUserPerms[$authorID;admin]==false]
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[Debe tener "admin" para hacer esto.]
- $color[c13849]
- $stop
- $elseif[$var[es]==$serverOwner]
- $authorIcon[$userAvatar[$var[es]]]
- $author[$username[$var[es]]]
- $description[No puedes quitarle premium al owner pruebe de nuevo.]
- $color[c13849]
- $stop
- $endif
- $if[$userExists[$var[es]]==false]
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[El usuario mencionadono existe pruebe de nuevo.]
- $color[c13849]
- $stop
- $elseif[$json[valor]==false]
- $authorIcon[$authorAvatar]
- $author[$username]
- $description[Este usuario no tiene premium por lo tanto no lo se puede quitar nada]
- $color[c13849]
- $stop
- $endif
- $authorIcon[$userAvatar[$var[es]]]
- $author[$username[$var[es]]]
- $jsonSetString[valor;false]
- $jsonSetString[tiempo;]
- $description[Se ha quitado el premium a <@$var[es]> correctamente.]
- $color[#2eb969]
- $setVar[premium;$jsonStringify;$var[es]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement