Python Forum
Discord Bot doesnt work when opened with windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discord Bot doesnt work when opened with windows
#1
I made a few changes to my discord bot and added a new command, a joke about hacking a discord server. The problem i have found is that it only runs when you run it with python (f5) but when you double click it, it doesnt.

Here is the code:

## Hack Command
@bot.command(pass_context=True)
async def hack_server_now(ctx):
await bot.say(">>> Initiating hack of the server")
await asyncio.sleep(2)
await bot.say(">>> Progress: 18%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 31%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 52%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 75%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 82%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 99%")
await asyncio.sleep(2)
await bot.say(">>> Hacking Complete! \n This server now belongs to Jarvis. \n ███████▓█████▓▓╬╬╬╬╬╬╬╬▓███▓╬╬╬╬╬╬╬▓╬╬▓█ \n████▓▓▓▓╬╬▓█████╬╬╬╬╬╬███▓╬╬╬╬╬╬╬╬╬╬╬╬╬█ \n███▓▓▓▓╬╬╬╬╬╬▓██╬╬╬╬╬╬▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n████▓▓▓╬╬╬╬╬╬╬▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n███▓█▓███████▓▓███▓╬╬╬╬╬╬▓███████▓╬╬╬╬▓█ \n████████████████▓█▓╬╬╬╬╬▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬█ \n███▓▓▓▓▓▓▓╬╬▓▓▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n████▓▓▓╬╬╬╬▓▓▓▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n███▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n█████▓▓▓▓▓▓▓▓█▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n█████▓▓▓▓▓▓▓██▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ \n█████▓▓▓▓▓████▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ \n████▓█▓▓▓▓██▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ \n████▓▓███▓▓▓▓▓▓▓██▓╬╬╬╬╬╬╬╬╬╬╬╬█▓╬▓╬╬▓██ \n█████▓███▓▓▓▓▓▓▓▓████▓▓╬╬╬╬╬╬╬█▓╬╬╬╬╬▓██ \n█████▓▓█▓███▓▓▓████╬▓█▓▓╬╬╬▓▓█▓╬╬╬╬╬╬███ \n██████▓██▓███████▓╬╬╬▓▓╬▓▓██▓╬╬╬╬╬╬╬▓███ \n███████▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬████ \n███████▓▓██▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓████ \n████████▓▓▓█████▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█████ \n█████████▓▓▓█▓▓▓▓▓███▓╬╬╬╬╬╬╬╬╬╬╬▓██████ \n██████████▓▓▓█▓▓▓╬▓██╬╬╬╬╬╬╬╬╬╬╬▓███████ \n███████████▓▓█▓▓▓▓███▓╬╬╬╬╬╬╬╬╬▓████████ \n██████████████▓▓▓███▓▓╬╬╬╬╬╬╬╬██████████ \n███████████████▓▓▓██▓▓╬╬╬╬╬╬▓███████████")



By the way, yes it is indented and all of the squares make an Anonymous mask
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I'm trying to install python 3.11.11 on windows 10 - it doesn't work Petonique 2 1,615 Feb-04-2025, 05:42 PM
Last Post: snippsat
  Executable file compiled by PyInstaller does not work on Windows 7 amusaber 1 1,655 Jul-11-2024, 02:59 PM
Last Post: DeaD_EyE
  equalto validator doesnt work robertkwild 1 865 Jun-02-2024, 06:16 AM
Last Post: Pedroski55
  print doesnt work in a function ony 2 1,040 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  Pydoc documentation doesnt work Cosmosso 5 6,633 Nov-25-2023, 11:17 PM
Last Post: vidito
  pip install requests doesnt work misodca 8 18,795 Jul-07-2023, 08:04 AM
Last Post: zyple
  does not save in other path than opened files before icode 3 2,781 Jun-23-2023, 07:25 PM
Last Post: snippsat
  Ldap3 Python print(conn.entries) doesnt work ilknurg 15 10,840 Dec-28-2022, 11:22 AM
Last Post: shad
  pip install pystyle doesnt work person_probably 2 3,772 Sep-23-2022, 02:59 PM
Last Post: person_probably
  Why doesnt chunk generation work? LotosProgramer 1 2,496 Apr-02-2022, 08:25 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020