Untitled

 avatar
user_5708622
plain_text
7 months ago
1.9 kB
1
Indexable
Never
module.exports = [{
name: "$alwaysExecute",
code: `$ifAwaited[$getUserVar[xp]>=$getUserVar[nextxp];{execute:levelupchannelcheck};{execute:xp}]
$onlyIf[$getGuildVar[leveling]==true;]
`
},{
    name: "levelupchannelcheck",
    type: "awaited",
    code: `$ifAwaited[$findChannel[$getGuildVar[lvlUpChannel];false]==;{execute:levelchannelnotfound};{execute:levelupchannel}]`
},{
    name: "levelchannelnotfound",
    type: "awaited",
    code: `<@$authorID>
$title[1;Level Up!]
$image[1;https://api.aggelos-007.xyz/levelup?level=$getUserVar[lvl]&avatar=$userAvatar[$authorID]]

$useChannel[$channelID]
$setUserVar[nextxp;$math[$getUserVar[nextxp]+$getGuildVar[nextxp]]]
$setUserVar[xp;$sub[$getUserVar[xp];$getUserVar[nextxp]]]
$setUserVar[lvl;$sum[$getUserVar[lvl];1]]`
},{
    name: "levelupchannel",
    type: "awaited",
    code: `$ifAwaited[$hasPermsInChannel[$getGuildVar[lvlUpChannel];$clientID;sendmessages]==false;{execute:levelup2};{execute:levelup}]`
},{
    name: "levelup2",
    type: "awaited",
    code: `<@$authorID>
$title[1;Level Up!]
$image[1;https://api.aggelos-007.xyz/levelup?level=$getUserVar[lvl]&avatar=$userAvatar[$authorID]]

$useChannel[$channelID]
$setUserVar[nextxp;$math[$getUserVar[nextxp]+$getGuildVar[nextxp]]]
$setUserVar[xp;$sub[$getUserVar[xp];$getUserVar[nextxp]]]
$setUserVar[lvl;$sum[$getUserVar[lvl];1]]`
},{
name: "levelup",
type: "awaited",
code: `<@$authorID>
$title[1;Level Up!]
$image[1;https://api.aggelos-007.xyz/levelup?level=$getUserVar[lvl]&avatar=$userAvatar[$authorID]]

$useChannel[$getGuildVar[lvlUpChannel]]
$setUserVar[nextxp;$math[$getUserVar[nextxp]+$getGuildVar[nextxp]]]
$setUserVar[xp;$sub[$getUserVar[xp];$getUserVar[nextxp]]]
$setUserVar[lvl;$sum[$getUserVar[lvl];1]]
`
},{
    name: "xp",
    type: "awaited",
    code: `$setUserVar[xp;$sum[$getUserVar[xp];$random[$getGuildVar[minXp];$getGuildVar[maxXp]]]]
$cooldown[$getGuildVar[lvlCoolDown];]`
}]
Leave a Comment