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
  .xlsm file can't be opened after writing data to one worksheet mhyatt 4 885 Oct-11-2025, 11:25 PM
Last Post: Pedroski55
  pip install requests doesnt work misodca 10 39,658 Sep-24-2025, 02:48 PM
Last Post: DeaD_EyE
  I'm trying to install python 3.11.11 on windows 10 - it doesn't work Petonique 2 5,252 Feb-04-2025, 05:42 PM
Last Post: snippsat
  Executable file compiled by PyInstaller does not work on Windows 7 amusaber 1 4,584 Jul-11-2024, 02:59 PM
Last Post: DeaD_EyE
  equalto validator doesnt work robertkwild 1 1,446 Jun-02-2024, 06:16 AM
Last Post: Pedroski55
  print doesnt work in a function ony 2 1,640 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  Pydoc documentation doesnt work Cosmosso 5 8,566 Nov-25-2023, 11:17 PM
Last Post: vidito
  does not save in other path than opened files before icode 3 5,416 Jun-23-2023, 07:25 PM
Last Post: snippsat
  Ldap3 Python print(conn.entries) doesnt work ilknurg 15 13,763 Dec-28-2022, 11:22 AM
Last Post: shad
  pip install pystyle doesnt work person_probably 2 4,925 Sep-23-2022, 02:59 PM
Last Post: person_probably

Forum Jump:

User Panel Messages

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