text: # fix by @heyworld for OUB
  # bug fixed by @d3athwarrior
  
  from telethon.tl.types import InputMediaDice
  from userbot.events import register
  from userbot import CMD_HELP
  
  
  @register(outgoing=True, pattern=r"^\.dice(?: |$)(.*)")
  async def _(event):
      if event.fwd_from:
          return
      input_str = event.pattern_match.group(1)
      await event.delete()
      r = await event.reply(file=InputMediaDice(''))
      if input_str:
          try:
              required_number = int(input_str)
              while not r.media.value == required_number:
                  await r.delete()
                  r = await event.reply(file=InputMediaDice(''))
          except BaseException:
              pass
  
  
  @register(outgoing=True, pattern=r"^\.dart(?: |$)(.*)")
  async def _(event):
      if event.fwd_from:
          return
      input_str = event.pattern_match.group(1)
      await event.delete()
      r = await event.reply(file=InputMediaDice('🎯'))
      if input_str:
          try:
              required_number = int(input_str)
              while not r.media.value == required_number:
                  await r.delete()
                  r = await event.reply(file=InputMediaDice('🎯'))
          except BaseException:
              pass
  
  
  @register(outgoing=True, pattern=r"^\.ball(?: |$)(.*)")
  async def _(event):
      if event.fwd_from:
          return
      input_str = event.pattern_match.group(1)
      await event.delete()
      r = await event.reply(file=InputMediaDice('🏀'))
      if input_str:
          try:
              required_number = int(input_str)
              while not r.media.value == required_number:
                  await r.delete()
                  r = await event.reply(file=InputMediaDice('🏀'))
          except BaseException:
              pass
  
  CMD_HELP.update({
      "emojigames": "✘ Pʟᴜɢɪɴ : Emoji Games\
      \n\n⚡𝘾𝙈𝘿⚡: `.dice` 1-6 or `.dart`1-6 or `.ball`1-5\
      \n↳ : hahaha just a magic.\nWarning:`Don't use any other values or bot will crash`"
  })
  