🧮 Funções · bank · API em Inglês

bank.convert(userId?, quantidade)

Converts a user's Stars into local currency, applying the Bank's conversion rate. Alias of bank.converter(), but taking the target user as a parameter.

bank.convert(userId?, quantidade)
📝This is the same Bank API, just with English names (a 1:1 alias of the methods above, same behaviour and same rules). Use whichever style you prefer — the two can even be mixed in the same script. Here, the target user is always an explicit parameter instead of always defaulting to whoever ran the script.

Parâmetros

AssinaturaTipo(s)
bank.convert(userId?, quantidade)string?, number

Valor de retorno

{ taxa, liquidoEstrelas, moedaGerada }

Exemplo de uso

let resultado = bank.convert(nil, tonumber(args._[0]))
message.reply("Received: " .. resultado.moedaGerada)

Observações

💡 Confira os tipos esperados na tabela de Parâmetros antes de chamar: passar um tipo diferente do esperado é a causa mais comum de erro em tempo de execução.

← Ver todas as funções de bank · API em Inglês