Custom Commands Help! String to HEX

I want to create a bot “convert string to hex”.
Can someone help me?
for example: !hex ABC
returns: ABC → 414243
thanks you very much.

This should do the trick:

$(eval Input=`$(query)`.split(``);Output=``;B1=`0`;function Hex(Input) {for(i=0;i<Input.length;i++){B1=Input[i];B2=`00`+B1.charCodeAt(0).toString(16);B3=B2.slice(B2.length-2,B2.length);Output+=B3+` `};return Output};Hex(Input))
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.