Advertisement
Rashwan-

Roll command

Mar 23rd, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. client.on ('message', async (revolution) => {
  2. if (!revolution.guild || revolution.author.bot) return false;
  3. var prefix = '!';
  4. if (revolution.content.startsWith(prefix + 'roll')) {
  5. var args = revolution.content.split(' ') [1];
  6. if (!args) return revolution.channel.send('ارسل رقم');
  7. if (isNaN (args))return revolution.channel.send('ارسل ارقام فقط');
  8. if (args < 1) return revolution.channel.send('يجب اختيار رقم فوق 0');
  9. revolution.channel.send (Math.floor (Math.random() * args));
  10. }
  11. })
  12. //By Rashwan || Revolution Codes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement