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
  print doesnt work in a function ony 2 233 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  Pydoc documentation doesnt work Cosmosso 5 4,266 Nov-25-2023, 11:17 PM
Last Post: vidito
  pip install requests doesnt work misodca 8 5,604 Jul-07-2023, 08:04 AM
Last Post: zyple
  does not save in other path than opened files before icode 3 833 Jun-23-2023, 07:25 PM
Last Post: snippsat
  Ldap3 Python print(conn.entries) doesnt work ilknurg 15 5,573 Dec-28-2022, 11:22 AM
Last Post: shad
  pip install pystyle doesnt work person_probably 2 2,004 Sep-23-2022, 02:59 PM
Last Post: person_probably
  Help discord bot Edward 0 2,059 Sep-15-2022, 09:55 PM
Last Post: Edward
  Why doesnt chunk generation work? LotosProgramer 1 1,910 Apr-02-2022, 08:25 AM
Last Post: deanhystad
Question How to get html information from a tab of my default browser opened with webbrowser? noahverner1995 2 4,338 Jan-14-2022, 10:02 AM
Last Post: noahverner1995
  if conditions in the for indentation doesnt work ? Sutsro 6 3,829 Jun-15-2021, 11:45 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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